about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorJames Miller <james@aatch.net>2013-06-20 17:15:50 +1200
committerJames Miller <bladeon@gmail.com>2013-06-21 02:43:02 +1200
commit3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e (patch)
tree3cec5e46a4f4a7b7b689f75b56e18ebc3f966bb4 /src/rt
parent6759ce4fd2083595193c93c3fd72383d24a73a5e (diff)
downloadrust-3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e.tar.gz
rust-3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e.zip
Remove all #[cfg(stage0)]-protected code
New snapshot means this can all go. Also removes places that have
comments that say they are workarounds for stage0 errors.
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.cpp11
-rw-r--r--src/rt/rust_task.cpp8
-rw-r--r--src/rt/rust_type.h8
3 files changed, 0 insertions, 27 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 3bd5e09e007..e476fa0ad5e 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -732,17 +732,10 @@ rust_task_deref(rust_task *task) {
 // Must call on rust stack.
 extern "C" CDECL void
 rust_call_tydesc_glue(void *root, size_t *tydesc, size_t glue_index) {
-#ifdef _RUST_STAGE0
-    void (*glue_fn)(void *, void *, void *, void *) =
-        (void (*)(void *, void *, void *, void *))tydesc[glue_index];
-    if (glue_fn)
-        glue_fn(0, 0, 0, root);
-#else
     void (*glue_fn)(void *, void *, void *) =
         (void (*)(void *, void *, void *))tydesc[glue_index];
     if (glue_fn)
         glue_fn(0, 0, root);
-#endif
 }
 
 // Don't run on the Rust stack!
@@ -762,11 +755,7 @@ public:
 
     virtual void run() {
         record_sp_limit(0);
-#ifdef _RUST_STAGE0
-        fn.f(NULL, fn.env, NULL);
-#else
         fn.f(fn.env, NULL);
-#endif
     }
 };
 
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index f9b588b7850..fe1b4622137 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -162,11 +162,7 @@ void task_start_wrapper(spawn_args *a)
 
     bool threw_exception = false;
     try {
-#ifdef _RUST_STAGE0
-        a->f(NULL, a->envptr, a->argptr);
-#else
         a->f(a->envptr, a->argptr);
-#endif
     } catch (rust_task *ex) {
         assert(ex == task && "Expected this task to be thrown for unwinding");
         threw_exception = true;
@@ -187,11 +183,7 @@ void task_start_wrapper(spawn_args *a)
     if(env) {
         // free the environment (which should be a unique closure).
         const type_desc *td = env->td;
-#ifdef _RUST_STAGE0
-        td->drop_glue(NULL, NULL, NULL, box_body(env));
-#else
         td->drop_glue(NULL, NULL, box_body(env));
-#endif
         task->kernel->region()->free(env);
     }
 
diff --git a/src/rt/rust_type.h b/src/rt/rust_type.h
index b50c08379de..6d36d2c960a 100644
--- a/src/rt/rust_type.h
+++ b/src/rt/rust_type.h
@@ -21,19 +21,11 @@ struct rust_opaque_box;
 // - the main function: has a NULL environment, but uses the void* arg
 // - unique closures of type fn~(): have a non-NULL environment, but
 //   no arguments (and hence the final void*) is harmless
-#ifdef _RUST_STAGE0
-typedef void (*CDECL spawn_fn)(void *, rust_opaque_box*, void *);
-#else
 typedef void (*CDECL spawn_fn)(rust_opaque_box*, void *);
-#endif
 
 struct type_desc;
 
-#ifdef _RUST_STAGE0
-typedef void CDECL (glue_fn)(void *, void *, const type_desc **, void *);
-#else
 typedef void CDECL (glue_fn)(void *, const type_desc **, void *);
-#endif
 
 // Corresponds to the boxed data in the @ region.  The body follows the
 // header; you can obtain a ptr via box_body() below.