Skip to content

Register new snapshots #9454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libstd/rt/crate_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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 {
Expand Down
18 changes: 1 addition & 17 deletions src/libstd/rt/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
30 changes: 0 additions & 30 deletions src/libstd/rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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`.
Expand Down
15 changes: 0 additions & 15 deletions src/libstd/unstable/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/snapshots.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/test/run-pass/attr-start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 0 additions & 8 deletions src/test/run-pass/core-rt-smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/generic-tag-corruption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"); }
11 changes: 0 additions & 11 deletions src/test/run-pass/rt-start-main-thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down