about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-03-20 11:06:42 -0700
committerbors <bors@rust-lang.org>2014-03-20 11:06:42 -0700
commit7334c11b4b196e39da2418a239e2ff916896fa19 (patch)
tree40a52d76075a591565c7a81aa300e7e16eefac62 /src/libstd/rt
parentb568efc0cf173ac7b2d37284beda5fdf8a7686ab (diff)
parent11ac4df4d2402188f96fa75b3c9b7962e9bac805 (diff)
downloadrust-7334c11b4b196e39da2418a239e2ff916896fa19.tar.gz
rust-7334c11b4b196e39da2418a239e2ff916896fa19.zip
auto merge of #13026 : alexcrichton/rust/snapshots, r=huonw
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/crate_map.rs62
-rw-r--r--src/libstd/rt/libunwind.rs10
-rw-r--r--src/libstd/rt/thread.rs3
3 files changed, 3 insertions, 72 deletions
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index 52cced26254..98f4986b2c7 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -13,11 +13,6 @@ use option::{Some, None, Option};
 use ptr::RawPtr;
 use rt::rtio::EventLoop;
 
-#[cfg(stage0)] use cmp::TotalOrd;
-#[cfg(stage0)] use container::MutableSet;
-#[cfg(stage0)] use iter::Iterator;
-#[cfg(stage0)] use slice::{ImmutableVector, OwnedVector};
-
 // Need to tell the linker on OS X to not barf on undefined symbols
 // and instead look them up at runtime, which we need to resolve
 // the crate_map properly.
@@ -25,20 +20,6 @@ use rt::rtio::EventLoop;
 #[link_args = "-Wl,-U,__rust_crate_map_toplevel"]
 extern {}
 
-#[cfg(stage0)]
-pub struct ModEntry<'a> {
-    name: &'a str,
-    log_level: *mut u32
-}
-
-#[cfg(stage0)]
-pub struct CrateMap<'a> {
-    version: i32,
-    entries: &'a [ModEntry<'a>],
-    children: &'a [&'a CrateMap<'a>],
-    event_loop_factory: Option<fn() -> ~EventLoop>,
-}
-#[cfg(not(stage0))]
 pub struct CrateMap<'a> {
     version: i32,
     event_loop_factory: Option<fn() -> ~EventLoop>,
@@ -121,46 +102,3 @@ pub fn get_crate_map() -> Option<&'static CrateMap<'static>> {
         }
     }
 }
-
-#[cfg(stage0)]
-fn version(crate_map: &CrateMap) -> i32 {
-    match crate_map.version {
-        2 => return 2,
-        _ => return 0
-    }
-}
-
-#[cfg(stage0)]
-fn do_iter_crate_map<'a>(
-                     crate_map: &'a CrateMap<'a>,
-                     f: |&'a ModEntry<'a>|,
-                     visited: &mut ~[*CrateMap<'a>]) {
-    let raw = crate_map as *CrateMap<'a>;
-    if visited.bsearch(|a| (*a as uint).cmp(&(raw as uint))).is_some() {
-        return
-    }
-    match visited.iter().position(|i| *i as uint > raw as uint) {
-        Some(i) => visited.insert(i, raw),
-        None => visited.push(raw),
-    }
-
-    match version(crate_map) {
-        2 => {
-            let (entries, children) = (crate_map.entries, crate_map.children);
-            for entry in entries.iter() {
-                f(entry);
-            }
-            for child in children.iter() {
-                do_iter_crate_map(*child, |x| f(x), visited);
-            }
-        },
-        _ => fail!("invalid crate map version")
-    }
-}
-
-/// Iterates recursively over `crate_map` and all child crate maps
-#[cfg(stage0)]
-pub fn iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: |&'a ModEntry<'a>|) {
-    let mut v = ~[];
-    do_iter_crate_map(crate_map, f, &mut v);
-}
diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs
index 2528a22be9a..fabfa2c8a7a 100644
--- a/src/libstd/rt/libunwind.rs
+++ b/src/libstd/rt/libunwind.rs
@@ -101,17 +101,11 @@ extern "C" {
     pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,
                              trace_argument: *libc::c_void)
                 -> _Unwind_Reason_Code;
-    #[cfg(stage0, not(target_os = "android"))]
-    pub fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t;
-    #[cfg(stage0, not(target_os = "android"))]
-    pub fn _Unwind_FindEnclosingFunction(pc: *libc::c_void) -> *libc::c_void;
 
-    #[cfg(not(stage0),
-          not(target_os = "android"),
+    #[cfg(not(target_os = "android"),
           not(target_os = "linux", target_arch = "arm"))]
     pub fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t;
-    #[cfg(not(stage0),
-          not(target_os = "android"),
+    #[cfg(not(target_os = "android"),
           not(target_os = "linux", target_arch = "arm"))]
     pub fn _Unwind_FindEnclosingFunction(pc: *libc::c_void) -> *libc::c_void;
 }
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs
index e27698d7dd0..0cbd67557de 100644
--- a/src/libstd/rt/thread.rs
+++ b/src/libstd/rt/thread.rs
@@ -271,7 +271,7 @@ mod imp {
     // Assumes that we've been dynamically linked to libpthread but that is
     // currently always the case.  Note that you need to check that the symbol
     // is non-null before calling it!
-    #[cfg(target_os = "linux", not(stage0))]
+    #[cfg(target_os = "linux")]
     fn min_stack_size(attr: *libc::pthread_attr_t) -> libc::size_t {
         use ptr::RawPtr;
         type F = extern "C" unsafe fn(*libc::pthread_attr_t) -> libc::size_t;
@@ -289,7 +289,6 @@ mod imp {
     // __pthread_get_minstack() is marked as weak but extern_weak linkage is
     // not supported on OS X, hence this kludge...
     #[cfg(not(target_os = "linux"))]
-    #[cfg(stage0)]
     fn min_stack_size(_: *libc::pthread_attr_t) -> libc::size_t {
         PTHREAD_STACK_MIN
     }