about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/stack.rs31
-rw-r--r--src/libstd/rt/unwind.rs41
2 files changed, 2 insertions, 70 deletions
diff --git a/src/libstd/rt/stack.rs b/src/libstd/rt/stack.rs
index b3be742e1ed..dc6ab494d64 100644
--- a/src/libstd/rt/stack.rs
+++ b/src/libstd/rt/stack.rs
@@ -30,7 +30,7 @@ pub static RED_ZONE: uint = 20 * 1024;
 /// stacks are currently not enabled as segmented stacks, but rather one giant
 /// stack segment. This means that whenever we run out of stack, we want to
 /// truly consider it to be stack overflow rather than allocating a new stack.
-#[cfg(not(test), not(stage0))] // in testing, use the original libstd's version
+#[cfg(not(test))] // in testing, use the original libstd's version
 #[lang = "stack_exhausted"]
 extern fn stack_exhausted() {
     use option::{Option, None, Some};
@@ -103,35 +103,6 @@ extern fn stack_exhausted() {
     }
 }
 
-#[no_mangle]      // - this is called from C code
-#[no_split_stack] // - it would be sad for this function to trigger __morestack
-#[doc(hidden)]    // - Function must be `pub` to get exported, but it's
-                  //   irrelevant for documentation purposes.
-#[cfg(stage0, not(test))] // in testing, use the original libstd's version
-pub extern "C" fn rust_stack_exhausted() {
-    use option::{Option, None, Some};
-    use owned::Box;
-    use rt::local::Local;
-    use rt::task::Task;
-    use str::Str;
-    use intrinsics;
-
-    unsafe {
-        let limit = get_sp_limit();
-        record_sp_limit(limit - RED_ZONE / 2);
-        let task: Option<Box<Task>> = Local::try_take();
-        let name = match task {
-            Some(ref task) => {
-                task.name.as_ref().map(|n| n.as_slice())
-            }
-            None => None
-        };
-        let name = name.unwrap_or("<unknown>");
-        rterrln!("task '{}' has overflowed its stack", name);
-        intrinsics::abort();
-    }
-}
-
 #[inline(always)]
 pub unsafe fn record_stack_bounds(stack_lo: uint, stack_hi: uint) {
     // When the old runtime had segmented stacks, it used a calculation that was
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs
index f34dcaaa427..dc2646102d2 100644
--- a/src/libstd/rt/unwind.rs
+++ b/src/libstd/rt/unwind.rs
@@ -213,7 +213,6 @@ pub mod eabi {
     }
 
     #[lang="eh_personality"]
-    #[cfg(not(stage0))]
     extern fn eh_personality(
         version: c_int,
         actions: uw::_Unwind_Action,
@@ -227,22 +226,6 @@ pub mod eabi {
                                  context)
         }
     }
-    #[lang="eh_personality"]
-    #[no_mangle] // so we can reference it by name from middle/trans/base.rs
-    #[cfg(stage0)]
-    pub extern "C" fn rust_eh_personality(
-        version: c_int,
-        actions: uw::_Unwind_Action,
-        exception_class: uw::_Unwind_Exception_Class,
-        ue_header: *uw::_Unwind_Exception,
-        context: *uw::_Unwind_Context
-    ) -> uw::_Unwind_Reason_Code
-    {
-        unsafe {
-            __gcc_personality_v0(version, actions, exception_class, ue_header,
-                                 context)
-        }
-    }
 
     #[no_mangle] // referenced from rust_try.ll
     pub extern "C" fn rust_eh_personality_catch(
@@ -281,7 +264,6 @@ pub mod eabi {
     }
 
     #[lang="eh_personality"]
-    #[cfg(not(stage0))]
     extern "C" fn eh_personality(
         state: uw::_Unwind_State,
         ue_header: *uw::_Unwind_Exception,
@@ -293,20 +275,6 @@ pub mod eabi {
         }
     }
 
-    #[lang="eh_personality"]
-    #[no_mangle] // so we can reference it by name from middle/trans/base.rs
-    #[cfg(stage0)]
-    pub extern "C" fn rust_eh_personality(
-        state: uw::_Unwind_State,
-        ue_header: *uw::_Unwind_Exception,
-        context: *uw::_Unwind_Context
-    ) -> uw::_Unwind_Reason_Code
-    {
-        unsafe {
-            __gcc_personality_v0(state, ue_header, context)
-        }
-    }
-
     #[no_mangle] // referenced from rust_try.ll
     pub extern "C" fn rust_eh_personality_catch(
         state: uw::_Unwind_State,
@@ -327,20 +295,13 @@ pub mod eabi {
 }
 
 // Entry point of failure from the libcore crate
-#[cfg(not(test), not(stage0))]
+#[cfg(not(test))]
 #[lang = "begin_unwind"]
 pub extern fn rust_begin_unwind(msg: &fmt::Arguments,
                                 file: &'static str, line: uint) -> ! {
     begin_unwind_fmt(msg, file, line)
 }
 
-#[no_mangle]
-#[cfg(not(test), stage0)]
-pub extern fn rust_begin_unwind(msg: &fmt::Arguments,
-                                file: &'static str, line: uint) -> ! {
-    begin_unwind_fmt(msg, file, line)
-}
-
 /// The entry point for unwinding with a formatted message.
 ///
 /// This is designed to reduce the amount of code required at the call