@@ -26,34 +26,6 @@ typedef int _Unwind_Action;
26
26
struct _Unwind_Context ;
27
27
struct _Unwind_Exception ;
28
28
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
-
57
29
#ifdef __SEH__
58
30
# define PERSONALITY_FUNC __gxx_personality_seh0
59
31
#else
@@ -107,19 +79,6 @@ upcall_rust_personality(int version,
107
79
return args.retval ;
108
80
}
109
81
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
-
123
82
// Landing pads need to call this to insert the
124
83
// correct limit into TLS.
125
84
// NB: This must run on the Rust stack because it
0 commit comments