From 4b770446b419e06d020c04ceb6ac7b8a63d2844d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 5 Nov 2013 08:25:32 -0800 Subject: [PATCH] Register new snapshots --- src/libstd/any.rs | 15 ------ src/libstd/ptr.rs | 83 ------------------------------- src/libstd/reflect.rs | 7 --- src/libstd/repr.rs | 12 ----- src/libstd/unstable/intrinsics.rs | 48 ++++-------------- src/libstd/vec.rs | 15 +----- src/snapshots.txt | 8 +++ 7 files changed, 18 insertions(+), 170 deletions(-) diff --git a/src/libstd/any.rs b/src/libstd/any.rs index 8cd8ca23b45..06f66a014dd 100644 --- a/src/libstd/any.rs +++ b/src/libstd/any.rs @@ -23,13 +23,6 @@ use util::Void; /////////////////////////////////////////////////////////////////////////////// /// `TypeId` represents a globally unique identifier for a type -#[cfg(stage0)] -pub struct TypeId { - priv t: *intrinsics::TyDesc, -} - -/// `TypeId` represents a globally unique identifier for a type -#[cfg(not(stage0))] pub struct TypeId { priv t: u64, } @@ -37,14 +30,6 @@ pub struct TypeId { impl TypeId { /// Returns the `TypeId` of the type this generic function has been instantiated with #[inline] - #[cfg(stage0)] - pub fn of() -> TypeId { - TypeId{ t: unsafe { intrinsics::get_tydesc::() } } - } - - /// Returns the `TypeId` of the type this generic function has been instantiated with - #[inline] - #[cfg(not(stage0))] pub fn of() -> TypeId { TypeId{ t: unsafe { intrinsics::type_id::() } } } diff --git a/src/libstd/ptr.rs b/src/libstd/ptr.rs index 65ae9f40403..29ae88272a4 100644 --- a/src/libstd/ptr.rs +++ b/src/libstd/ptr.rs @@ -87,35 +87,6 @@ pub fn is_not_null>(ptr: P) -> bool { ptr.is_not_null() } * and destination may overlap. */ #[inline] -#[cfg(target_word_size = "32", stage0)] -pub unsafe fn copy_memory>(dst: *mut T, src: P, count: uint) { - intrinsics::memmove32(dst, - cast::transmute_immut_unsafe(src), - count as u32); -} - -/** - * Copies data from one location to another. - * - * Copies `count` elements (not bytes) from `src` to `dst`. The source - * and destination may overlap. - */ -#[inline] -#[cfg(target_word_size = "64", stage0)] -pub unsafe fn copy_memory>(dst: *mut T, src: P, count: uint) { - intrinsics::memmove64(dst, - cast::transmute_immut_unsafe(src), - count as u64); -} - -/** - * Copies data from one location to another. - * - * Copies `count` elements (not bytes) from `src` to `dst`. The source - * and destination may overlap. - */ -#[inline] -#[cfg(not(stage0))] pub unsafe fn copy_memory>(dst: *mut T, src: P, count: uint) { intrinsics::copy_memory(dst, cast::transmute_immut_unsafe(src), count) } @@ -127,39 +98,6 @@ pub unsafe fn copy_memory>(dst: *mut T, src: P, count: uint) { * and destination may *not* overlap. */ #[inline] -#[cfg(target_word_size = "32", stage0)] -pub unsafe fn copy_nonoverlapping_memory>(dst: *mut T, - src: P, - count: uint) { - intrinsics::memcpy32(dst, - cast::transmute_immut_unsafe(src), - count as u32); -} - -/** - * Copies data from one location to another. - * - * Copies `count` elements (not bytes) from `src` to `dst`. The source - * and destination may *not* overlap. - */ -#[inline] -#[cfg(target_word_size = "64", stage0)] -pub unsafe fn copy_nonoverlapping_memory>(dst: *mut T, - src: P, - count: uint) { - intrinsics::memcpy64(dst, - cast::transmute_immut_unsafe(src), - count as u64); -} - -/** - * Copies data from one location to another. - * - * Copies `count` elements (not bytes) from `src` to `dst`. The source - * and destination may *not* overlap. - */ -#[inline] -#[cfg(not(stage0))] pub unsafe fn copy_nonoverlapping_memory>(dst: *mut T, src: P, count: uint) { @@ -171,27 +109,6 @@ pub unsafe fn copy_nonoverlapping_memory>(dst: *mut T, * bytes of memory starting at `dst` to `c`. */ #[inline] -#[cfg(target_word_size = "32", stage0)] -pub unsafe fn set_memory(dst: *mut T, c: u8, count: uint) { - intrinsics::memset32(dst, c, count as u32); -} - -/** - * Invokes memset on the specified pointer, setting `count * size_of::()` - * bytes of memory starting at `dst` to `c`. - */ -#[inline] -#[cfg(target_word_size = "64", stage0)] -pub unsafe fn set_memory(dst: *mut T, c: u8, count: uint) { - intrinsics::memset64(dst, c, count as u64); -} - -/** - * Invokes memset on the specified pointer, setting `count * size_of::()` - * bytes of memory starting at `dst` to `c`. - */ -#[inline] -#[cfg(not(stage0))] pub unsafe fn set_memory(dst: *mut T, c: u8, count: uint) { intrinsics::set_memory(dst, c, count) } diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs index c841750d7ce..164dc75a515 100644 --- a/src/libstd/reflect.rs +++ b/src/libstd/reflect.rs @@ -382,13 +382,6 @@ impl TyVisitor for MovePtrAdaptor { true } - #[cfg(stage0)] - fn visit_fn_output(&mut self, retstyle: uint, inner: *TyDesc) -> bool { - if ! self.inner.visit_fn_output(retstyle, inner) { return false; } - true - } - - #[cfg(not(stage0))] fn visit_fn_output(&mut self, retstyle: uint, variadic: bool, inner: *TyDesc) -> bool { if ! self.inner.visit_fn_output(retstyle, variadic, inner) { return false; } true diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index 97b42a1ebc1..e939be64d73 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -572,18 +572,6 @@ impl<'self> TyVisitor for ReprVisitor<'self> { true } - #[cfg(stage0)] - fn visit_fn_output(&mut self, _retstyle: uint, inner: *TyDesc) -> bool { - self.writer.write(")".as_bytes()); - let name = unsafe { (*inner).name }; - if name != "()" { - self.writer.write(" -> ".as_bytes()); - self.writer.write(name.as_bytes()); - } - true - } - - #[cfg(not(stage0))] fn visit_fn_output(&mut self, _retstyle: uint, variadic: bool, inner: *TyDesc) -> bool { if variadic { self.writer.write(", ...".as_bytes()); diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs index 030364c75af..59d1740acc0 100644 --- a/src/libstd/unstable/intrinsics.rs +++ b/src/libstd/unstable/intrinsics.rs @@ -160,9 +160,6 @@ pub trait TyVisitor { fn visit_enter_fn(&mut self, purity: uint, proto: uint, n_inputs: uint, retstyle: uint) -> bool; fn visit_fn_input(&mut self, i: uint, mode: uint, inner: *TyDesc) -> bool; - #[cfg(stage0)] - fn visit_fn_output(&mut self, retstyle: uint, inner: *TyDesc) -> bool; - #[cfg(not(stage0))] fn visit_fn_output(&mut self, retstyle: uint, variadic: bool, inner: *TyDesc) -> bool; fn visit_leave_fn(&mut self, purity: uint, proto: uint, n_inputs: uint, retstyle: uint) -> bool; @@ -313,7 +310,6 @@ extern "rust-intrinsic" { /// Gets an identifier which is globally unique to the specified type. This /// function will return the same value for a type regardless of whichever /// crate it is invoked in. - #[cfg(not(stage0))] pub fn type_id() -> u64; /// Create a value initialized to zero. @@ -337,11 +333,6 @@ extern "rust-intrinsic" { pub fn needs_drop() -> bool; /// Returns `true` if a type is managed (will be allocated on the local heap) - #[cfg(stage0)] - pub fn contains_managed() -> bool; - - /// Returns `true` if a type is managed (will be allocated on the local heap) - #[cfg(not(stage0))] pub fn owns_managed() -> bool; pub fn visit_tydesc(td: *TyDesc, tv: &mut TyVisitor); @@ -357,40 +348,19 @@ extern "rust-intrinsic" { /// integer, since the conversion would throw away aliasing information. pub fn offset(dst: *T, offset: int) -> *T; - /// Equivalent to the `llvm.memcpy.p0i8.0i8.i32` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memcpy32(dst: *mut T, src: *T, count: u32); - /// Equivalent to the `llvm.memcpy.p0i8.0i8.i64` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memcpy64(dst: *mut T, src: *T, count: u64); - - /// Equivalent to the `llvm.memmove.p0i8.0i8.i32` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memmove32(dst: *mut T, src: *T, count: u32); - /// Equivalent to the `llvm.memmove.p0i8.0i8.i64` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memmove64(dst: *mut T, src: *T, count: u64); - - /// Equivalent to the `llvm.memset.p0i8.i32` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memset32(dst: *mut T, val: u8, count: u32); - /// Equivalent to the `llvm.memset.p0i8.i64` intrinsic, with a size of - /// `count` * `size_of::()` and an alignment of `min_align_of::()` - #[cfg(stage0)] - pub fn memset64(dst: *mut T, val: u8, count: u64); - - #[cfg(not(stage0))] + /// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with + /// a size of `count` * `size_of::()` and an alignment of + /// `min_align_of::()` pub fn copy_nonoverlapping_memory(dst: *mut T, src: *T, count: uint); - #[cfg(not(stage0))] + /// Equivalent to the appropriate `llvm.memmove.p0i8.0i8.*` intrinsic, with + /// a size of `count` * `size_of::()` and an alignment of + /// `min_align_of::()` pub fn copy_memory(dst: *mut T, src: *T, count: uint); - #[cfg(not(stage0))] + /// Equivalent to the appropriate `llvm.memset.p0i8.*` intrinsic, with a + /// size of `count` * `size_of::()` and an alignment of + /// `min_align_of::()` pub fn set_memory(dst: *mut T, val: u8, count: uint); pub fn sqrtf32(x: f32) -> f32; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index c9d55735015..194a72bad6f 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -121,19 +121,11 @@ use mem::size_of; use uint; use unstable::finally::Finally; use unstable::intrinsics; -use unstable::intrinsics::{get_tydesc}; +use unstable::intrinsics::{get_tydesc, owns_managed}; use unstable::raw::{Box, Repr, Slice, Vec}; use vec; use util; -#[cfg(not(stage0))] -use unstable::intrinsics::owns_managed; - -#[cfg(stage0)] -unsafe fn owns_managed() -> bool { - intrinsics::contains_managed::() -} - /** * Creates and initializes an owned vector. * @@ -2066,13 +2058,8 @@ pub mod raw { use unstable::intrinsics; use vec::{with_capacity, ImmutableVector, MutableVector}; use unstable::raw::{Box, Vec, Slice}; - - #[cfg(not(stage0))] use unstable::intrinsics::owns_managed; - #[cfg(stage0)] - use vec::owns_managed; - /** * Sets the length of a vector * diff --git a/src/snapshots.txt b/src/snapshots.txt index 699c9bb8e95..6031db7c155 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,11 @@ +S 2013-11-06 fdc830d + freebsd-x86_64 ef38f3acf8d05eda3c9f21e75c2bbd2f90a614a3 + linux-i386 6ad20f6722c15a71fe7654d187dc431e26c1da6f + linux-x86_64 699b4bef2eff078ae6cfaac093c580b322dc769c + macos-i386 8c9d906116359bc665d8ad04ce117b9f5a8a9ae2 + macos-x86_64 1954f546017639f7ff4cc584120ba41c29c790d2 + winnt-i386 ce528f85f1470b3183c1e310452103c0c7f89751 + S 2013-11-01 8ea2123 freebsd-x86_64 bc7dea1ca297cfb4bd6d8a32185c6a4fddca3e6b linux-i386 4b33599d160d757f6021ff05d0213fba3097dde2