about summary refs log tree commit diff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-06-15 14:25:53 -0700
committerEric Holk <eholk@mozilla.com>2011-06-15 14:25:53 -0700
commit92bd35075bafc2835cc7dd1075f29e246c0c7c1c (patch)
treef1cea5448c8ea7c358733bf78997294fdff9d98b /src/rt/rust.cpp
parent6a3f4abc6f4a72f12c4868612684a9925110e722 (diff)
downloadrust-92bd35075bafc2835cc7dd1075f29e246c0c7c1c.tar.gz
rust-92bd35075bafc2835cc7dd1075f29e246c0c7c1c.zip
Step 2 of cdecl task transition.
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index a8ac7c7ef9c..bed8a21d991 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -71,16 +71,6 @@ command_line_args : public dom_owned<command_line_args>
     }
 };
 
-// THIS IS AN UGLY HACK TO MAKE rust_start STILL WORK WITH STAGE0 WHILE WE
-// TRANSITION TO ALL-CDECL TASK STARTUP FUNCTIONS.
-void FASTCALL
-(*real_main)(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d) = NULL;
-
-void CDECL fake_main(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d)
-{
-    real_main(a, b, c, d);
-}
-
 /**
  * Main entry point into the Rust runtime. Here we create a Rust service,
  * initialize the kernel, create the root domain and run it.
@@ -104,9 +94,9 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map,
         DLOG(dom, dom, "startup: arg[%d] = '%s'", i, args->argv[i]);
     }
 
-    real_main = (typeof(real_main))main_fn;
-    if(main_fn) { printf("using fastcall main\n"); }
-    dom->root_task->start(main_fn ? (uintptr_t)fake_main : main_fn_cdecl,
+    if(main_fn) { printf("using new cdecl main\n"); }
+    else { printf("using old cdecl main\n"); }
+    dom->root_task->start(main_fn ? main_fn : main_fn_cdecl,
                           (uintptr_t)args->args, sizeof(args->args));
 
     int ret = dom->start_main_loop();