From 4ce2ee12beea76727fe2ced87748c31725ce4e98 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 11 Sep 2012 15:57:32 -0700 Subject: Add a bunch of inline hints. --- src/libcore/sys.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libcore/sys.rs') diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 8eee6088630..cff945ad069 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -65,6 +65,7 @@ pure fn shape_le(x1: &T, x2: &T) -> bool { * Useful for calling certain function in the Rust runtime or otherwise * performing dark magick. */ +#[inline(always)] pure fn get_type_desc() -> *TypeDesc { unchecked { rusti::get_tydesc::() as *TypeDesc } } @@ -93,6 +94,7 @@ pure fn pref_align_of() -> uint { } /// Returns the refcount of a shared box (as just before calling this) +#[inline(always)] pure fn refcount(+t: @T) -> uint { unsafe { let ref_ptr: *uint = unsafe::reinterpret_cast(&t); -- cgit 1.4.1-3-g733a5