Skip to content

Commit 7fc6893

Browse files
committed
auto merge of #10328 : alexcrichton/rust/snapshots, r=thestinger
2 parents 22eb11c + 4b77044 commit 7fc6893

File tree

7 files changed

+18
-170
lines changed

7 files changed

+18
-170
lines changed

src/libstd/any.rs

-15
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,13 @@ use util::Void;
2323
///////////////////////////////////////////////////////////////////////////////
2424

2525
/// `TypeId` represents a globally unique identifier for a type
26-
#[cfg(stage0)]
27-
pub struct TypeId {
28-
priv t: *intrinsics::TyDesc,
29-
}
30-
31-
/// `TypeId` represents a globally unique identifier for a type
32-
#[cfg(not(stage0))]
3326
pub struct TypeId {
3427
priv t: u64,
3528
}
3629

3730
impl TypeId {
3831
/// Returns the `TypeId` of the type this generic function has been instantiated with
3932
#[inline]
40-
#[cfg(stage0)]
41-
pub fn of<T: 'static>() -> TypeId {
42-
TypeId{ t: unsafe { intrinsics::get_tydesc::<T>() } }
43-
}
44-
45-
/// Returns the `TypeId` of the type this generic function has been instantiated with
46-
#[inline]
47-
#[cfg(not(stage0))]
4833
pub fn of<T: 'static>() -> TypeId {
4934
TypeId{ t: unsafe { intrinsics::type_id::<T>() } }
5035
}

src/libstd/ptr.rs

-83
Original file line numberDiff line numberDiff line change
@@ -87,35 +87,6 @@ pub fn is_not_null<T,P:RawPtr<T>>(ptr: P) -> bool { ptr.is_not_null() }
8787
* and destination may overlap.
8888
*/
8989
#[inline]
90-
#[cfg(target_word_size = "32", stage0)]
91-
pub unsafe fn copy_memory<T,P:RawPtr<T>>(dst: *mut T, src: P, count: uint) {
92-
intrinsics::memmove32(dst,
93-
cast::transmute_immut_unsafe(src),
94-
count as u32);
95-
}
96-
97-
/**
98-
* Copies data from one location to another.
99-
*
100-
* Copies `count` elements (not bytes) from `src` to `dst`. The source
101-
* and destination may overlap.
102-
*/
103-
#[inline]
104-
#[cfg(target_word_size = "64", stage0)]
105-
pub unsafe fn copy_memory<T,P:RawPtr<T>>(dst: *mut T, src: P, count: uint) {
106-
intrinsics::memmove64(dst,
107-
cast::transmute_immut_unsafe(src),
108-
count as u64);
109-
}
110-
111-
/**
112-
* Copies data from one location to another.
113-
*
114-
* Copies `count` elements (not bytes) from `src` to `dst`. The source
115-
* and destination may overlap.
116-
*/
117-
#[inline]
118-
#[cfg(not(stage0))]
11990
pub unsafe fn copy_memory<T,P:RawPtr<T>>(dst: *mut T, src: P, count: uint) {
12091
intrinsics::copy_memory(dst, cast::transmute_immut_unsafe(src), count)
12192
}
@@ -127,39 +98,6 @@ pub unsafe fn copy_memory<T,P:RawPtr<T>>(dst: *mut T, src: P, count: uint) {
12798
* and destination may *not* overlap.
12899
*/
129100
#[inline]
130-
#[cfg(target_word_size = "32", stage0)]
131-
pub unsafe fn copy_nonoverlapping_memory<T,P:RawPtr<T>>(dst: *mut T,
132-
src: P,
133-
count: uint) {
134-
intrinsics::memcpy32(dst,
135-
cast::transmute_immut_unsafe(src),
136-
count as u32);
137-
}
138-
139-
/**
140-
* Copies data from one location to another.
141-
*
142-
* Copies `count` elements (not bytes) from `src` to `dst`. The source
143-
* and destination may *not* overlap.
144-
*/
145-
#[inline]
146-
#[cfg(target_word_size = "64", stage0)]
147-
pub unsafe fn copy_nonoverlapping_memory<T,P:RawPtr<T>>(dst: *mut T,
148-
src: P,
149-
count: uint) {
150-
intrinsics::memcpy64(dst,
151-
cast::transmute_immut_unsafe(src),
152-
count as u64);
153-
}
154-
155-
/**
156-
* Copies data from one location to another.
157-
*
158-
* Copies `count` elements (not bytes) from `src` to `dst`. The source
159-
* and destination may *not* overlap.
160-
*/
161-
#[inline]
162-
#[cfg(not(stage0))]
163101
pub unsafe fn copy_nonoverlapping_memory<T,P:RawPtr<T>>(dst: *mut T,
164102
src: P,
165103
count: uint) {
@@ -171,27 +109,6 @@ pub unsafe fn copy_nonoverlapping_memory<T,P:RawPtr<T>>(dst: *mut T,
171109
* bytes of memory starting at `dst` to `c`.
172110
*/
173111
#[inline]
174-
#[cfg(target_word_size = "32", stage0)]
175-
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
176-
intrinsics::memset32(dst, c, count as u32);
177-
}
178-
179-
/**
180-
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
181-
* bytes of memory starting at `dst` to `c`.
182-
*/
183-
#[inline]
184-
#[cfg(target_word_size = "64", stage0)]
185-
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
186-
intrinsics::memset64(dst, c, count as u64);
187-
}
188-
189-
/**
190-
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
191-
* bytes of memory starting at `dst` to `c`.
192-
*/
193-
#[inline]
194-
#[cfg(not(stage0))]
195112
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
196113
intrinsics::set_memory(dst, c, count)
197114
}

src/libstd/reflect.rs

-7
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,6 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
382382
true
383383
}
384384

385-
#[cfg(stage0)]
386-
fn visit_fn_output(&mut self, retstyle: uint, inner: *TyDesc) -> bool {
387-
if ! self.inner.visit_fn_output(retstyle, inner) { return false; }
388-
true
389-
}
390-
391-
#[cfg(not(stage0))]
392385
fn visit_fn_output(&mut self, retstyle: uint, variadic: bool, inner: *TyDesc) -> bool {
393386
if ! self.inner.visit_fn_output(retstyle, variadic, inner) { return false; }
394387
true

src/libstd/repr.rs

-12
Original file line numberDiff line numberDiff line change
@@ -572,18 +572,6 @@ impl<'self> TyVisitor for ReprVisitor<'self> {
572572
true
573573
}
574574

575-
#[cfg(stage0)]
576-
fn visit_fn_output(&mut self, _retstyle: uint, inner: *TyDesc) -> bool {
577-
self.writer.write(")".as_bytes());
578-
let name = unsafe { (*inner).name };
579-
if name != "()" {
580-
self.writer.write(" -> ".as_bytes());
581-
self.writer.write(name.as_bytes());
582-
}
583-
true
584-
}
585-
586-
#[cfg(not(stage0))]
587575
fn visit_fn_output(&mut self, _retstyle: uint, variadic: bool, inner: *TyDesc) -> bool {
588576
if variadic {
589577
self.writer.write(", ...".as_bytes());

src/libstd/unstable/intrinsics.rs

+9-39
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ pub trait TyVisitor {
160160
fn visit_enter_fn(&mut self, purity: uint, proto: uint,
161161
n_inputs: uint, retstyle: uint) -> bool;
162162
fn visit_fn_input(&mut self, i: uint, mode: uint, inner: *TyDesc) -> bool;
163-
#[cfg(stage0)]
164-
fn visit_fn_output(&mut self, retstyle: uint, inner: *TyDesc) -> bool;
165-
#[cfg(not(stage0))]
166163
fn visit_fn_output(&mut self, retstyle: uint, variadic: bool, inner: *TyDesc) -> bool;
167164
fn visit_leave_fn(&mut self, purity: uint, proto: uint,
168165
n_inputs: uint, retstyle: uint) -> bool;
@@ -313,7 +310,6 @@ extern "rust-intrinsic" {
313310
/// Gets an identifier which is globally unique to the specified type. This
314311
/// function will return the same value for a type regardless of whichever
315312
/// crate it is invoked in.
316-
#[cfg(not(stage0))]
317313
pub fn type_id<T: 'static>() -> u64;
318314

319315
/// Create a value initialized to zero.
@@ -337,11 +333,6 @@ extern "rust-intrinsic" {
337333
pub fn needs_drop<T>() -> bool;
338334

339335
/// Returns `true` if a type is managed (will be allocated on the local heap)
340-
#[cfg(stage0)]
341-
pub fn contains_managed<T>() -> bool;
342-
343-
/// Returns `true` if a type is managed (will be allocated on the local heap)
344-
#[cfg(not(stage0))]
345336
pub fn owns_managed<T>() -> bool;
346337

347338
pub fn visit_tydesc(td: *TyDesc, tv: &mut TyVisitor);
@@ -357,40 +348,19 @@ extern "rust-intrinsic" {
357348
/// integer, since the conversion would throw away aliasing information.
358349
pub fn offset<T>(dst: *T, offset: int) -> *T;
359350

360-
/// Equivalent to the `llvm.memcpy.p0i8.0i8.i32` intrinsic, with a size of
361-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
362-
#[cfg(stage0)]
363-
pub fn memcpy32<T>(dst: *mut T, src: *T, count: u32);
364-
/// Equivalent to the `llvm.memcpy.p0i8.0i8.i64` intrinsic, with a size of
365-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
366-
#[cfg(stage0)]
367-
pub fn memcpy64<T>(dst: *mut T, src: *T, count: u64);
368-
369-
/// Equivalent to the `llvm.memmove.p0i8.0i8.i32` intrinsic, with a size of
370-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
371-
#[cfg(stage0)]
372-
pub fn memmove32<T>(dst: *mut T, src: *T, count: u32);
373-
/// Equivalent to the `llvm.memmove.p0i8.0i8.i64` intrinsic, with a size of
374-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
375-
#[cfg(stage0)]
376-
pub fn memmove64<T>(dst: *mut T, src: *T, count: u64);
377-
378-
/// Equivalent to the `llvm.memset.p0i8.i32` intrinsic, with a size of
379-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
380-
#[cfg(stage0)]
381-
pub fn memset32<T>(dst: *mut T, val: u8, count: u32);
382-
/// Equivalent to the `llvm.memset.p0i8.i64` intrinsic, with a size of
383-
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
384-
#[cfg(stage0)]
385-
pub fn memset64<T>(dst: *mut T, val: u8, count: u64);
386-
387-
#[cfg(not(stage0))]
351+
/// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with
352+
/// a size of `count` * `size_of::<T>()` and an alignment of
353+
/// `min_align_of::<T>()`
388354
pub fn copy_nonoverlapping_memory<T>(dst: *mut T, src: *T, count: uint);
389355

390-
#[cfg(not(stage0))]
356+
/// Equivalent to the appropriate `llvm.memmove.p0i8.0i8.*` intrinsic, with
357+
/// a size of `count` * `size_of::<T>()` and an alignment of
358+
/// `min_align_of::<T>()`
391359
pub fn copy_memory<T>(dst: *mut T, src: *T, count: uint);
392360

393-
#[cfg(not(stage0))]
361+
/// Equivalent to the appropriate `llvm.memset.p0i8.*` intrinsic, with a
362+
/// size of `count` * `size_of::<T>()` and an alignment of
363+
/// `min_align_of::<T>()`
394364
pub fn set_memory<T>(dst: *mut T, val: u8, count: uint);
395365

396366
pub fn sqrtf32(x: f32) -> f32;

src/libstd/vec.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,11 @@ use mem::size_of;
121121
use uint;
122122
use unstable::finally::Finally;
123123
use unstable::intrinsics;
124-
use unstable::intrinsics::{get_tydesc};
124+
use unstable::intrinsics::{get_tydesc, owns_managed};
125125
use unstable::raw::{Box, Repr, Slice, Vec};
126126
use vec;
127127
use util;
128128

129-
#[cfg(not(stage0))]
130-
use unstable::intrinsics::owns_managed;
131-
132-
#[cfg(stage0)]
133-
unsafe fn owns_managed<T>() -> bool {
134-
intrinsics::contains_managed::<T>()
135-
}
136-
137129
/**
138130
* Creates and initializes an owned vector.
139131
*
@@ -2066,13 +2058,8 @@ pub mod raw {
20662058
use unstable::intrinsics;
20672059
use vec::{with_capacity, ImmutableVector, MutableVector};
20682060
use unstable::raw::{Box, Vec, Slice};
2069-
2070-
#[cfg(not(stage0))]
20712061
use unstable::intrinsics::owns_managed;
20722062

2073-
#[cfg(stage0)]
2074-
use vec::owns_managed;
2075-
20762063
/**
20772064
* Sets the length of a vector
20782065
*

src/snapshots.txt

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
S 2013-11-06 fdc830d
2+
freebsd-x86_64 ef38f3acf8d05eda3c9f21e75c2bbd2f90a614a3
3+
linux-i386 6ad20f6722c15a71fe7654d187dc431e26c1da6f
4+
linux-x86_64 699b4bef2eff078ae6cfaac093c580b322dc769c
5+
macos-i386 8c9d906116359bc665d8ad04ce117b9f5a8a9ae2
6+
macos-x86_64 1954f546017639f7ff4cc584120ba41c29c790d2
7+
winnt-i386 ce528f85f1470b3183c1e310452103c0c7f89751
8+
19
S 2013-11-01 8ea2123
210
freebsd-x86_64 bc7dea1ca297cfb4bd6d8a32185c6a4fddca3e6b
311
linux-i386 4b33599d160d757f6021ff05d0213fba3097dde2

0 commit comments

Comments
 (0)