Register new snapshots

This commit is contained in:
Alex Crichton 2013-11-05 08:25:32 -08:00
parent 22eb11c09b
commit 4b770446b4
7 changed files with 18 additions and 170 deletions

View File

@ -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<T: 'static>() -> TypeId {
TypeId{ t: unsafe { intrinsics::get_tydesc::<T>() } }
}
/// Returns the `TypeId` of the type this generic function has been instantiated with
#[inline]
#[cfg(not(stage0))]
pub fn of<T: 'static>() -> TypeId {
TypeId{ t: unsafe { intrinsics::type_id::<T>() } }
}

View File

@ -87,35 +87,6 @@ pub fn is_not_null<T,P:RawPtr<T>>(ptr: P) -> bool { ptr.is_not_null() }
* and destination may overlap.
*/
#[inline]
#[cfg(target_word_size = "32", stage0)]
pub unsafe fn copy_memory<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(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<T,P:RawPtr<T>>(dst: *mut T,
src: P,
count: uint) {
@ -171,27 +109,6 @@ pub unsafe fn copy_nonoverlapping_memory<T,P:RawPtr<T>>(dst: *mut T,
* bytes of memory starting at `dst` to `c`.
*/
#[inline]
#[cfg(target_word_size = "32", stage0)]
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
intrinsics::memset32(dst, c, count as u32);
}
/**
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
* bytes of memory starting at `dst` to `c`.
*/
#[inline]
#[cfg(target_word_size = "64", stage0)]
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
intrinsics::memset64(dst, c, count as u64);
}
/**
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
* bytes of memory starting at `dst` to `c`.
*/
#[inline]
#[cfg(not(stage0))]
pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
intrinsics::set_memory(dst, c, count)
}

View File

@ -382,13 +382,6 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
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

View File

@ -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());

View File

@ -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<T: 'static>() -> u64;
/// Create a value initialized to zero.
@ -337,11 +333,6 @@ extern "rust-intrinsic" {
pub fn needs_drop<T>() -> bool;
/// Returns `true` if a type is managed (will be allocated on the local heap)
#[cfg(stage0)]
pub fn contains_managed<T>() -> bool;
/// Returns `true` if a type is managed (will be allocated on the local heap)
#[cfg(not(stage0))]
pub fn owns_managed<T>() -> 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<T>(dst: *T, offset: int) -> *T;
/// Equivalent to the `llvm.memcpy.p0i8.0i8.i32` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memcpy32<T>(dst: *mut T, src: *T, count: u32);
/// Equivalent to the `llvm.memcpy.p0i8.0i8.i64` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memcpy64<T>(dst: *mut T, src: *T, count: u64);
/// Equivalent to the `llvm.memmove.p0i8.0i8.i32` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memmove32<T>(dst: *mut T, src: *T, count: u32);
/// Equivalent to the `llvm.memmove.p0i8.0i8.i64` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memmove64<T>(dst: *mut T, src: *T, count: u64);
/// Equivalent to the `llvm.memset.p0i8.i32` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memset32<T>(dst: *mut T, val: u8, count: u32);
/// Equivalent to the `llvm.memset.p0i8.i64` intrinsic, with a size of
/// `count` * `size_of::<T>()` and an alignment of `min_align_of::<T>()`
#[cfg(stage0)]
pub fn memset64<T>(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::<T>()` and an alignment of
/// `min_align_of::<T>()`
pub fn copy_nonoverlapping_memory<T>(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::<T>()` and an alignment of
/// `min_align_of::<T>()`
pub fn copy_memory<T>(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::<T>()` and an alignment of
/// `min_align_of::<T>()`
pub fn set_memory<T>(dst: *mut T, val: u8, count: uint);
pub fn sqrtf32(x: f32) -> f32;

View File

@ -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<T>() -> bool {
intrinsics::contains_managed::<T>()
}
/**
* 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
*

View File

@ -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