diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 7ccb06a3296..e7648a081be 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -26,34 +26,6 @@ typedef int _Unwind_Action; struct _Unwind_Context; struct _Unwind_Exception; -typedef void (*CDECL stack_switch_shim)(void*); - -/********************************************************************** - * Switches to the C-stack and invokes |fn_ptr|, passing |args| as argument. - * This is used by the C compiler to call foreign functions and by other - * upcalls to switch to the C stack. The return value is passed through a - * field in the args parameter. This upcall is specifically for switching - * to the shim functions generated by rustc. - */ -extern "C" CDECL void -upcall_call_shim_on_c_stack(void *args, void *fn_ptr) { - stack_switch_shim f = (stack_switch_shim)fn_ptr; - f(args); -} - -/* - * The opposite of above. Starts on a C stack and switches to the Rust - * stack. This is the only upcall that runs from the C stack. - */ -extern "C" CDECL void -upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) { - // There's no task. Call the function and hope for the best - stack_switch_shim f = (stack_switch_shim)fn_ptr; - f(args); -} - -/**********************************************************************/ - #ifdef __SEH__ # define PERSONALITY_FUNC __gxx_personality_seh0 #else @@ -107,19 +79,6 @@ upcall_rust_personality(int version, return args.retval; } -// NB: This needs to be blazing fast. Don't switch stacks -extern "C" CDECL void * -upcall_new_stack(size_t stk_sz, void *args_addr, size_t args_sz) { - assert(false && "newsched shouldn't be growing the stack"); - return NULL; -} - -// NB: This needs to be blazing fast. Don't switch stacks -extern "C" CDECL void -upcall_del_stack() { - assert(false && "newsched shouldn't be growing the stack"); -} - // Landing pads need to call this to insert the // correct limit into TLS. // NB: This must run on the Rust stack because it diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in index 47c9554daa0..60e4d3abd7a 100644 --- a/src/rt/rustrt.def.in +++ b/src/rt/rustrt.def.in @@ -25,10 +25,6 @@ rust_win32_rand_acquire rust_win32_rand_gen rust_win32_rand_release upcall_rust_personality -upcall_call_shim_on_c_stack -upcall_call_shim_on_rust_stack -upcall_new_stack -upcall_del_stack upcall_reset_stack_limit rust_uv_loop_new rust_uv_loop_delete