@@ -26,34 +26,6 @@ typedef int _Unwind_Action;
2626struct _Unwind_Context ;
2727struct _Unwind_Exception ;
2828
29- typedef void (*CDECL stack_switch_shim)(void *);
30-
31- /* *********************************************************************
32- * Switches to the C-stack and invokes |fn_ptr|, passing |args| as argument.
33- * This is used by the C compiler to call foreign functions and by other
34- * upcalls to switch to the C stack. The return value is passed through a
35- * field in the args parameter. This upcall is specifically for switching
36- * to the shim functions generated by rustc.
37- */
38- extern " C" CDECL void
39- upcall_call_shim_on_c_stack (void *args, void *fn_ptr) {
40- stack_switch_shim f = (stack_switch_shim)fn_ptr;
41- f (args);
42- }
43-
44- /*
45- * The opposite of above. Starts on a C stack and switches to the Rust
46- * stack. This is the only upcall that runs from the C stack.
47- */
48- extern " C" CDECL void
49- upcall_call_shim_on_rust_stack (void *args, void *fn_ptr) {
50- // There's no task. Call the function and hope for the best
51- stack_switch_shim f = (stack_switch_shim)fn_ptr;
52- f (args);
53- }
54-
55- /* *********************************************************************/
56-
5729#ifdef __SEH__
5830# define PERSONALITY_FUNC __gxx_personality_seh0
5931#else
@@ -107,19 +79,6 @@ upcall_rust_personality(int version,
10779 return args.retval ;
10880}
10981
110- // NB: This needs to be blazing fast. Don't switch stacks
111- extern " C" CDECL void *
112- upcall_new_stack (size_t stk_sz, void *args_addr, size_t args_sz) {
113- assert (false && " newsched shouldn't be growing the stack" );
114- return NULL ;
115- }
116-
117- // NB: This needs to be blazing fast. Don't switch stacks
118- extern " C" CDECL void
119- upcall_del_stack () {
120- assert (false && " newsched shouldn't be growing the stack" );
121- }
122-
12382// Landing pads need to call this to insert the
12483// correct limit into TLS.
12584// NB: This must run on the Rust stack because it
0 commit comments