]> git.lizzy.rs Git - rust.git/commitdiff
Register new snapshots
authorAlex Crichton <alex@alexcrichton.com>
Thu, 13 Feb 2014 00:40:17 +0000 (16:40 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 13 Feb 2014 20:54:17 +0000 (12:54 -0800)
Makefile.in
src/libextra/lib.rs
src/libstd/cleanup.rs
src/libstd/reflect.rs
src/libstd/repr.rs
src/libstd/rt/global_heap.rs
src/libstd/rt/local_heap.rs
src/libstd/unstable/intrinsics.rs
src/libstd/unstable/lang.rs
src/libstd/unstable/raw.rs
src/snapshots.txt

index 1130ab53d5d246f0cd4f747e1fd4aa94a568eafc..ef1701a61e80b8502c5b99f24db8c8507166ef7e 100644 (file)
@@ -125,10 +125,7 @@ ifdef TRACE
   CFG_RUSTC_FLAGS += -Z trace
 endif
 ifdef CFG_DISABLE_RPATH
-# NOTE: make this CFG_RUSTC_FLAGS after stage0 snapshot
-RUSTFLAGS_STAGE1 += -C no-rpath
-RUSTFLAGS_STAGE2 += -C no-rpath
-RUSTFLAGS_STAGE3 += -C no-rpath
+CFG_RUSTC_FLAGS += -C no-rpath
 endif
 
 # The executables crated during this compilation process have no need to include
@@ -140,8 +137,7 @@ endif
 # snapshot will be generated with a statically linked rustc so we only have to
 # worry about the distribution of one file (with its native dynamic
 # dependencies)
-#
-# NOTE: after a snapshot (stage0), put this on stage0 as well
+RUSTFLAGS_STAGE0 += -C prefer-dynamic
 RUSTFLAGS_STAGE1 += -C prefer-dynamic
 
 # platform-specific auto-configuration
index e0200f48cfecad7f1ddd759ff5d9740de7304c27..c630ac096f622ad578cec3399723567274c59064 100644 (file)
 #[deny(missing_doc)];
 
 extern mod sync;
-#[cfg(not(stage0))]
 extern mod serialize;
 
 extern mod collections;
 
-#[cfg(stage0)]
-pub mod serialize {
-    #[allow(missing_doc)];
-    // Temp re-export until after a snapshot
-    extern mod serialize = "serialize";
-    pub use self::serialize::{Encoder, Decoder, Encodable, Decodable,
-                                   EncoderHelpers, DecoderHelpers};
-}
-
 // Utility modules
 
 pub mod c_vec;
index a43dca949703043b538f9a1ae73bc103f84c9dd6..dd43d8e2971a83a5332d1b1a5ed8ad38f79357f9 100644 (file)
@@ -57,53 +57,6 @@ fn debug_mem() -> bool {
 }
 
 /// Destroys all managed memory (i.e. @ boxes) held by the current task.
-#[cfg(stage0)]
-pub unsafe fn annihilate() {
-    use rt::local_heap::local_free;
-
-    let mut n_total_boxes = 0u;
-
-    // Pass 1: Make all boxes immortal.
-    //
-    // In this pass, nothing gets freed, so it does not matter whether
-    // we read the next field before or after the callback.
-    each_live_alloc(true, |alloc| {
-        n_total_boxes += 1;
-        (*alloc).ref_count = RC_IMMORTAL;
-        true
-    });
-
-    // Pass 2: Drop all boxes.
-    //
-    // In this pass, unique-managed boxes may get freed, but not
-    // managed boxes, so we must read the `next` field *after* the
-    // callback, as the original value may have been freed.
-    each_live_alloc(false, |alloc| {
-        let tydesc = (*alloc).type_desc;
-        let data = &(*alloc).data as *();
-        ((*tydesc).drop_glue)(data as *i8);
-        true
-    });
-
-    // Pass 3: Free all boxes.
-    //
-    // In this pass, managed boxes may get freed (but not
-    // unique-managed boxes, though I think that none of those are
-    // left), so we must read the `next` field before, since it will
-    // not be valid after.
-    each_live_alloc(true, |alloc| {
-        local_free(alloc as *u8);
-        true
-    });
-
-    if debug_mem() {
-        // We do logging here w/o allocation.
-        debug!("total boxes annihilated: {}", n_total_boxes);
-    }
-}
-
-/// Destroys all managed memory (i.e. @ boxes) held by the current task.
-#[cfg(not(stage0))]
 pub unsafe fn annihilate() {
     use rt::local_heap::local_free;
 
index 1c22408592a74f56979d8d62bef3ee1802d728a5..f88da60ae9b7971a219783371273635ad6e5a1a8 100644 (file)
@@ -441,11 +441,4 @@ fn visit_self(&mut self) -> bool {
         self.align_to::<&'static u8>();
         true
     }
-
-    // NOTE Remove after next snapshot.
-    #[cfg(stage0)]
-    fn visit_type(&mut self) -> bool {
-        if ! self.inner.visit_type() { return false; }
-        true
-    }
 }
index 4ced74a92b7c04fb8cc568412cadfe97b9e8c165..dc745ff548f02b0a39de4254d3999a89b1b037c7 100644 (file)
@@ -601,10 +601,6 @@ fn visit_trait(&mut self, name: &str) -> bool {
 
     fn visit_param(&mut self, _i: uint) -> bool { true }
     fn visit_self(&mut self) -> bool { true }
-
-    // NOTE Remove after next snapshot.
-    #[cfg(stage0)]
-    fn visit_type(&mut self) -> bool { true }
 }
 
 pub fn write_repr<T>(writer: &mut io::Writer, object: &T) -> io::IoResult<()> {
index 2f553585f38ce67b0b3fac4e50be4a1d53213b64..4bce16706ee60c3235c710a598daf281cfe4378b 100644 (file)
@@ -10,8 +10,6 @@
 
 use libc::{c_void, size_t, free, malloc, realloc};
 use ptr::{RawPtr, mut_null};
-#[cfg(stage0)]
-use unstable::intrinsics::TyDesc;
 use unstable::intrinsics::abort;
 use unstable::raw;
 use mem::size_of;
@@ -75,15 +73,7 @@ pub unsafe fn exchange_malloc(size: uint) -> *u8 {
 }
 
 // FIXME: #7496
-#[cfg(not(test), stage0)]
-#[lang="closure_exchange_malloc"]
-#[inline]
-pub unsafe fn closure_exchange_malloc_(td: *u8, size: uint) -> *u8 {
-    closure_exchange_malloc(td, size)
-}
-
-// FIXME: #7496
-#[cfg(not(test), not(stage0))]
+#[cfg(not(test))]
 #[lang="closure_exchange_malloc"]
 #[inline]
 pub unsafe fn closure_exchange_malloc_(drop_glue: fn(*mut u8), size: uint, align: uint) -> *u8 {
@@ -91,24 +81,6 @@ pub unsafe fn closure_exchange_malloc_(drop_glue: fn(*mut u8), size: uint, align
 }
 
 #[inline]
-#[cfg(stage0)]
-pub unsafe fn closure_exchange_malloc(td: *u8, size: uint) -> *u8 {
-    let td = td as *TyDesc;
-    let size = size;
-
-    assert!(td.is_not_null());
-
-    let total_size = get_box_size(size, (*td).align);
-    let p = malloc_raw(total_size);
-
-    let alloc = p as *mut raw::Box<()>;
-    (*alloc).type_desc = td;
-
-    alloc as *u8
-}
-
-#[inline]
-#[cfg(not(stage0))]
 pub unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uint) -> *u8 {
     let total_size = get_box_size(size, align);
     let p = malloc_raw(total_size);
index 3bee9e48b602ed7c8cf81360a921ee8c406a9864..023f712d3a08ad1d9f5150b1de4a9a5ff4b8921e 100644 (file)
@@ -21,8 +21,6 @@
 use rt::global_heap;
 use rt::local::Local;
 use rt::task::Task;
-#[cfg(stage0)]
-use unstable::intrinsics::TyDesc;
 use unstable::raw;
 use vec::ImmutableVector;
 
@@ -61,29 +59,6 @@ pub fn new() -> LocalHeap {
     }
 
     #[inline]
-    #[cfg(stage0)]
-    pub fn alloc(&mut self, td: *TyDesc, size: uint) -> *mut Box {
-        let total_size = global_heap::get_box_size(size, unsafe { (*td).align });
-        let alloc = self.memory_region.malloc(total_size);
-        {
-            // Make sure that we can't use `mybox` outside of this scope
-            let mybox: &mut Box = unsafe { cast::transmute(alloc) };
-            // Clear out this box, and move it to the front of the live
-            // allocations list
-            mybox.type_desc = td;
-            mybox.ref_count = 1;
-            mybox.prev = ptr::mut_null();
-            mybox.next = self.live_allocs;
-            if !self.live_allocs.is_null() {
-                unsafe { (*self.live_allocs).prev = alloc; }
-            }
-            self.live_allocs = alloc;
-        }
-        return alloc;
-    }
-
-    #[inline]
-    #[cfg(not(stage0))]
     pub fn alloc(&mut self, drop_glue: fn(*mut u8), size: uint, align: uint) -> *mut Box {
         let total_size = global_heap::get_box_size(size, align);
         let alloc = self.memory_region.malloc(total_size);
@@ -126,41 +101,6 @@ pub fn realloc(&mut self, ptr: *mut Box, size: uint) -> *mut Box {
     }
 
     #[inline]
-    #[cfg(stage0)]
-    pub fn free(&mut self, alloc: *mut Box) {
-        {
-            // Make sure that we can't use `mybox` outside of this scope
-            let mybox: &mut Box = unsafe { cast::transmute(alloc) };
-            assert!(!mybox.type_desc.is_null());
-
-            // Unlink it from the linked list
-            if !mybox.prev.is_null() {
-                unsafe { (*mybox.prev).next = mybox.next; }
-            }
-            if !mybox.next.is_null() {
-                unsafe { (*mybox.next).prev = mybox.prev; }
-            }
-            if self.live_allocs == alloc {
-                self.live_allocs = mybox.next;
-            }
-
-            // Destroy the box memory-wise
-            if self.poison_on_free {
-                unsafe {
-                    let ptr: *mut u8 = cast::transmute(&mybox.data);
-                    ptr::set_memory(ptr, 0xab, (*mybox.type_desc).size);
-                }
-            }
-            mybox.prev = ptr::mut_null();
-            mybox.next = ptr::mut_null();
-            mybox.type_desc = ptr::null();
-        }
-
-        self.memory_region.free(alloc);
-    }
-
-    #[inline]
-    #[cfg(not(stage0))]
     pub fn free(&mut self, alloc: *mut Box) {
         {
             // Make sure that we can't use `mybox` outside of this scope
@@ -339,20 +279,6 @@ fn drop(&mut self) {
 }
 
 #[inline]
-#[cfg(stage0)]
-pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
-    // FIXME: Unsafe borrow for speed. Lame.
-    let task: Option<*mut Task> = Local::try_unsafe_borrow();
-    match task {
-        Some(task) => {
-            (*task).heap.alloc(td as *TyDesc, size) as *u8
-        }
-        None => rtabort!("local malloc outside of task")
-    }
-}
-
-#[inline]
-#[cfg(not(stage0))]
 pub unsafe fn local_malloc(drop_glue: fn(*mut u8), size: uint, align: uint) -> *u8 {
     // FIXME: Unsafe borrow for speed. Lame.
     let task: Option<*mut Task> = Local::try_unsafe_borrow();
index b9e9c9d5a436f47b357aee00f2ff00c1aceef758..c983d82563caf7000a44aae32f074d1c70f378dc 100644 (file)
@@ -160,10 +160,6 @@ fn visit_leave_fn(&mut self, purity: uint, proto: uint,
     fn visit_trait(&mut self, name: &str) -> bool;
     fn visit_param(&mut self, i: uint) -> bool;
     fn visit_self(&mut self) -> bool;
-
-    // NOTE Remove after next snapshot.
-    #[cfg(stage0)]
-    fn visit_type(&mut self) -> bool;
 }
 
 extern "rust-intrinsic" {
index a85f26720bf179df02b923d650ef2fad6f40e6a7..4648f149a9fed92c287939d30f67c5e02cce9a5f 100644 (file)
@@ -27,14 +27,6 @@ pub fn fail_bounds_check(file: *u8, line: uint, index: uint, len: uint) -> ! {
 }
 
 #[lang="malloc"]
-#[cfg(stage0)]
-#[inline]
-pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
-    ::rt::local_heap::local_malloc(td, size)
-}
-
-#[lang="malloc"]
-#[cfg(not(stage0))]
 #[inline]
 pub unsafe fn local_malloc(drop_glue: fn(*mut u8), size: uint, align: uint) -> *u8 {
     ::rt::local_heap::local_malloc(drop_glue, size, align)
index 98dde95d3b7cc03d804c5af9d1ea4eb67568639b..87547997798f5f1049107c46033fbc2a7c0aa70c 100644 (file)
@@ -9,21 +9,8 @@
 // except according to those terms.
 
 use cast;
-#[cfg(stage0)]
-use unstable::intrinsics::TyDesc;
 
 /// The representation of a Rust managed box
-#[cfg(stage0)]
-pub struct Box<T> {
-    ref_count: uint,
-    type_desc: *TyDesc,
-    prev: *mut Box<T>,
-    next: *mut Box<T>,
-    data: T
-}
-
-/// The representation of a Rust managed box
-#[cfg(not(stage0))]
 pub struct Box<T> {
     ref_count: uint,
     drop_glue: fn(ptr: *mut u8),
index 8cf463dd88a808bf4d3bb166ae85baa7efddf39a..2db884fdb6436d2df391db5fdab3c688924638bb 100644 (file)
@@ -1,3 +1,11 @@
+S 2014-02-12 c62f6ce
+  freebsd-x86_64 737a423c5f803119ff5a692eac432fa9d0c595a8
+  linux-i386 a7e90e27e8b6a3fa79ddc15f0ed217ccbade875d
+  linux-x86_64 8f5fdf9f07b2afbc55d8d8c06c60aeb532b5ea83
+  macos-i386 57bb225f45bc57fef4c34552a2d5814ab4913087
+  macos-x86_64 d37b62478aa1c1dd1babb19d1df494d2aaf59c4c
+  winnt-i386 2c5c5f7228140cd79f120201805504a9e07ad245
+
 S 2014-02-03 346d378
   freebsd-x86_64 d369c1a83a2be6eb42bd0e550a1adc38ffed0804
   linux-i386 a6d4ab441f5b285d7aecbb940fa733526b413f34