about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-23 21:06:03 -0700
committerbors <bors@rust-lang.org>2013-09-23 21:06:03 -0700
commitc1b187d41b2cb16a409259f1530bc8fcc705364f (patch)
treee9cde0daddc608969087b57792480db7d9359fc9
parentd062de8aa48083439237cb338b38c25306bf6c94 (diff)
parent51cfcc83824b0c2e5569e40f5266c0493603d691 (diff)
downloadrust-c1b187d41b2cb16a409259f1530bc8fcc705364f.tar.gz
rust-c1b187d41b2cb16a409259f1530bc8fcc705364f.zip
auto merge of #9454 : alexcrichton/rust/snapshot, r=thestinger
-rw-r--r--src/libstd/rt/crate_map.rs6
-rw-r--r--src/libstd/rt/logging.rs18
-rw-r--r--src/libstd/rt/mod.rs30
-rw-r--r--src/libstd/unstable/lang.rs15
-rw-r--r--src/snapshots.txt8
-rw-r--r--src/test/run-pass/attr-start.rs6
-rw-r--r--src/test/run-pass/core-rt-smoke.rs8
-rw-r--r--src/test/run-pass/generic-tag-corruption.rs2
-rw-r--r--src/test/run-pass/rt-start-main-thread.rs11
9 files changed, 13 insertions, 91 deletions
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index f73aa1fad67..67cbdaae4fa 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -23,7 +23,7 @@ use container::MutableSet;
 #[link_args = "-undefined dynamic_lookup"]
 extern {}
 
-#[cfg(not(stage0), not(windows))]
+#[cfg(not(windows))]
 extern {
     #[weak_linkage]
     #[link_name = "_rust_crate_map_toplevel"]
@@ -48,12 +48,12 @@ struct CrateMap {
     children: [*CrateMap, ..1]
 }
 
-#[cfg(not(stage0), not(windows))]
+#[cfg(not(windows))]
 pub fn get_crate_map() -> *CrateMap {
     &'static CRATE_MAP as *CrateMap
 }
 
-#[cfg(not(stage0), windows)]
+#[cfg(windows)]
 #[fixed_stack_segment]
 #[inline(never)]
 pub fn get_crate_map() -> *CrateMap {
diff --git a/src/libstd/rt/logging.rs b/src/libstd/rt/logging.rs
index 26072079bcc..3dbf7a918b7 100644
--- a/src/libstd/rt/logging.rs
+++ b/src/libstd/rt/logging.rs
@@ -12,7 +12,7 @@ use libc::{uintptr_t, exit, STDERR_FILENO};
 use option::{Some, None, Option};
 use rt::util::dumb_println;
 use rt::crate_map::{ModEntry, iter_crate_map};
-#[cfg(not(stage0))] use rt::crate_map::get_crate_map;
+use rt::crate_map::get_crate_map;
 use str::StrSlice;
 use str::raw::from_c_str;
 use u32;
@@ -211,22 +211,6 @@ impl Logger for StdErrLogger {
 }
 /// Configure logging by traversing the crate map and setting the
 /// per-module global logging flags based on the logging spec
-#[fixed_stack_segment] #[inline(never)]
-#[cfg(stage0)]
-pub fn init(crate_map: *u8) {
-    use os;
-
-    let log_spec = os::getenv("RUST_LOG");
-    match log_spec {
-        Some(spec) => {
-            update_log_settings(crate_map, spec);
-        }
-        None => {
-            update_log_settings(crate_map, ~"");
-        }
-    }
-}
-#[cfg(not(stage0))]
 pub fn init() {
     use os;
 
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 85a379cab5a..2ece2800cf2 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -176,16 +176,6 @@ pub mod borrowck;
 /// # Return value
 ///
 /// The return value is used as the process return code. 0 on success, 101 on error.
-#[cfg(stage0)]
-pub fn start(argc: int, argv: **u8, crate_map: *u8, main: ~fn()) -> int {
-
-    init(argc, argv, crate_map);
-    let exit_code = run(main);
-    cleanup();
-
-    return exit_code;
-}
-#[cfg(not(stage0))]
 pub fn start(argc: int, argv: **u8, main: ~fn()) -> int {
 
     init(argc, argv);
@@ -200,15 +190,6 @@ pub fn start(argc: int, argv: **u8, main: ~fn()) -> int {
 ///
 /// This is appropriate for running code that must execute on the main thread,
 /// such as the platform event loop and GUI.
-#[cfg(stage0)]
-pub fn start_on_main_thread(argc: int, argv: **u8, crate_map: *u8, main: ~fn()) -> int {
-    init(argc, argv, crate_map);
-    let exit_code = run_on_main_thread(main);
-    cleanup();
-
-    return exit_code;
-}
-#[cfg(not(stage0))]
 pub fn start_on_main_thread(argc: int, argv: **u8, main: ~fn()) -> int {
     init(argc, argv);
     let exit_code = run_on_main_thread(main);
@@ -222,17 +203,6 @@ pub fn start_on_main_thread(argc: int, argv: **u8, main: ~fn()) -> int {
 /// Initializes global state, including frobbing
 /// the crate's logging flags, registering GC
 /// metadata, and storing the process arguments.
-#[cfg(stage0)]
-pub fn init(argc: int, argv: **u8, crate_map: *u8) {
-    // XXX: Derefing these pointers is not safe.
-    // Need to propagate the unsafety to `start`.
-    unsafe {
-        args::init(argc, argv);
-        env::init();
-        logging::init(crate_map);
-    }
-}
-#[cfg(not(stage0))]
 pub fn init(argc: int, argv: **u8) {
     // XXX: Derefing these pointers is not safe.
     // Need to propagate the unsafety to `start`.
diff --git a/src/libstd/unstable/lang.rs b/src/libstd/unstable/lang.rs
index baa70551489..b2a0062d727 100644
--- a/src/libstd/unstable/lang.rs
+++ b/src/libstd/unstable/lang.rs
@@ -93,21 +93,6 @@ pub unsafe fn check_not_borrowed(a: *u8,
     borrowck::check_not_borrowed(a, file, line)
 }
 
-#[cfg(stage0)]
-#[lang="start"]
-pub fn start(main: *u8, argc: int, argv: **c_char,
-             crate_map: *u8) -> int {
-    use rt;
-
-    unsafe {
-        return do rt::start(argc, argv as **u8, crate_map) {
-            let main: extern "Rust" fn() = transmute(main);
-            main();
-        };
-    }
-}
-
-#[cfg(not(stage0))]
 #[lang="start"]
 pub fn start(main: *u8, argc: int, argv: **c_char) -> int {
     use rt;
diff --git a/src/snapshots.txt b/src/snapshots.txt
index 705cf50632a..3d3f314b994 100644
--- a/src/snapshots.txt
+++ b/src/snapshots.txt
@@ -1,3 +1,11 @@
+S 2013-09-23 348d844
+  freebsd-x86_64 8b99ec197e441f013c5ba0788f8bcfa689bfc75e
+  linux-i386 9a237fcbe4d29986a360b1dc8984da3b946463e6
+  linux-x86_64 47906010eb676cbf9e0caa0773d9ef2dce89e9f8
+  macos-i386 7085e4dd6bc63864f2ad8a3a21dab945ffd99d8d
+  macos-x86_64 efefdca6b4a40ebeb977037ebbf46c1353f09ee5
+  winnt-i386 7988b58a9530a4ac0688ec978e9124c5db56717c
+
 S 2013-09-17 cbd1eef
   freebsd-x86_64 9166867a8859076343cb3e57da918b5c0eea720b
   linux-i386 38347b579312ff30c36d257a1161660eb0ae8422
diff --git a/src/test/run-pass/attr-start.rs b/src/test/run-pass/attr-start.rs
index 4c9d388dbd7..ca75af90129 100644
--- a/src/test/run-pass/attr-start.rs
+++ b/src/test/run-pass/attr-start.rs
@@ -11,12 +11,6 @@
 //xfail-fast
 
 #[start]
-#[cfg(stage0)]
-fn start(_argc: int, _argv: **u8, _crate_map: *u8) -> int {
-    return 0;
-}
-#[start]
-#[cfg(not(stage0))]
 fn start(_argc: int, _argv: **u8) -> int {
     return 0;
 }
diff --git a/src/test/run-pass/core-rt-smoke.rs b/src/test/run-pass/core-rt-smoke.rs
index d7824a6524f..6e3d9629da0 100644
--- a/src/test/run-pass/core-rt-smoke.rs
+++ b/src/test/run-pass/core-rt-smoke.rs
@@ -13,14 +13,6 @@
 // A simple test of starting the runtime manually
 
 #[start]
-#[cfg(stage0)]
-fn start(argc: int, argv: **u8, crate_map: *u8) -> int {
-    do std::rt::start(argc, argv, crate_map) {
-        info!("creating my own runtime is joy");
-    }
-}
-#[start]
-#[cfg(not(stage0))]
 fn start(argc: int, argv: **u8) -> int {
     do std::rt::start(argc, argv) {
         info!("creating my own runtime is joy");
diff --git a/src/test/run-pass/generic-tag-corruption.rs b/src/test/run-pass/generic-tag-corruption.rs
index 4fd8b73c819..deab9c71523 100644
--- a/src/test/run-pass/generic-tag-corruption.rs
+++ b/src/test/run-pass/generic-tag-corruption.rs
@@ -11,7 +11,7 @@
 
 
 
-// This causes memory corruption in stage0.
+// This used to cause memory corruption in stage 0.
 enum thing<K> { some(K), }
 
 pub fn main() { let _x = some(~"hi"); }
diff --git a/src/test/run-pass/rt-start-main-thread.rs b/src/test/run-pass/rt-start-main-thread.rs
index 05e76137885..47a723ce6e1 100644
--- a/src/test/run-pass/rt-start-main-thread.rs
+++ b/src/test/run-pass/rt-start-main-thread.rs
@@ -11,17 +11,6 @@
 // xfail-fast
 
 #[start]
-#[cfg(stage0)]
-fn start(argc: int, argv: **u8, crate_map: *u8) -> int {
-    do std::rt::start_on_main_thread(argc, argv, crate_map) {
-        info!("running on main thread");
-        do spawn {
-            info!("running on another thread");
-        }
-    }
-}
-#[start]
-#[cfg(not(stage0))]
 fn start(argc: int, argv: **u8) -> int {
     do std::rt::start_on_main_thread(argc, argv) {
         info!("running on main thread");