Skip to content

Commit d78c443

Browse files
committed
---
yaml --- r: 32559 b: refs/heads/dist-snap c: 4ce2ee1 h: refs/heads/master i: 32557: 3c7064b 32555: 483621f 32551: b8955e6 32543: 2709b3e v: v3
1 parent f7d5ae5 commit d78c443

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 3c14dae4a64b791eec86a11f04fcbeab5df23911
10+
refs/heads/dist-snap: 4ce2ee12beea76727fe2ced87748c31725ce4e98
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/sys.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ pure fn shape_le<T:Ord>(x1: &T, x2: &T) -> bool {
6565
* Useful for calling certain function in the Rust runtime or otherwise
6666
* performing dark magick.
6767
*/
68+
#[inline(always)]
6869
pure fn get_type_desc<T>() -> *TypeDesc {
6970
unchecked { rusti::get_tydesc::<T>() as *TypeDesc }
7071
}
@@ -93,6 +94,7 @@ pure fn pref_align_of<T>() -> uint {
9394
}
9495

9596
/// Returns the refcount of a shared box (as just before calling this)
97+
#[inline(always)]
9698
pure fn refcount<T>(+t: @T) -> uint {
9799
unsafe {
98100
let ref_ptr: *uint = unsafe::reinterpret_cast(&t);

branches/dist-snap/src/libcore/unsafe.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ unsafe fn bump_box_refcount<T>(+t: @T) { forget(move t); }
5151
*
5252
* assert transmute("L") == ~[76u8, 0u8];
5353
*/
54+
#[inline(always)]
5455
unsafe fn transmute<L, G>(-thing: L) -> G {
5556
debug!(">>> in transmute! <<<");
5657
debug!("transmute 1: %?", &thing);
@@ -61,26 +62,33 @@ unsafe fn transmute<L, G>(-thing: L) -> G {
6162
}
6263

6364
/// Coerce an immutable reference to be mutable.
65+
#[inline(always)]
6466
unsafe fn transmute_mut<T>(+ptr: &a/T) -> &a/mut T { transmute(move ptr) }
6567

6668
/// Coerce a mutable reference to be immutable.
69+
#[inline(always)]
6770
unsafe fn transmute_immut<T>(+ptr: &a/mut T) -> &a/T { transmute(move ptr) }
6871

6972
/// Coerce a borrowed pointer to have an arbitrary associated region.
73+
#[inline(always)]
7074
unsafe fn transmute_region<T>(+ptr: &a/T) -> &b/T { transmute(move ptr) }
7175

7276
/// Coerce an immutable reference to be mutable.
77+
#[inline(always)]
7378
unsafe fn transmute_mut_unsafe<T>(+ptr: *const T) -> *mut T { transmute(ptr) }
7479

7580
/// Coerce an immutable reference to be mutable.
81+
#[inline(always)]
7682
unsafe fn transmute_immut_unsafe<T>(+ptr: *const T) -> *T { transmute(ptr) }
7783

7884
/// Coerce a borrowed mutable pointer to have an arbitrary associated region.
85+
#[inline(always)]
7986
unsafe fn transmute_mut_region<T>(+ptr: &a/mut T) -> &b/mut T {
8087
transmute(move ptr)
8188
}
8289

8390
/// Transforms lifetime of the second pointer to match the first.
91+
#[inline(always)]
8492
unsafe fn copy_lifetime<S,T>(_ptr: &a/S, ptr: &T) -> &a/T {
8593
transmute_region(ptr)
8694
}

branches/dist-snap/src/libcore/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ use cmp::Eq;
99
*/
1010

1111
/// The identity function.
12+
#[inline(always)]
1213
pure fn id<T>(+x: T) -> T { move x }
1314

1415
/// Ignores a value.
16+
#[inline(always)]
1517
pure fn ignore<T>(+_x: T) { }
1618

1719
/// Sets `*ptr` to `new_value`, invokes `op()`, and then restores the

0 commit comments

Comments
 (0)