Skip to content

Commit 24a69dd

Browse files
committed
rt: Remove four unused upcalls
1 parent 611c94d commit 24a69dd

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

src/rt/rust_upcall.cpp

-41
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,6 @@ typedef int _Unwind_Action;
2626
struct _Unwind_Context;
2727
struct _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

src/rt/rustrt.def.in

-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ rust_win32_rand_acquire
2525
rust_win32_rand_gen
2626
rust_win32_rand_release
2727
upcall_rust_personality
28-
upcall_call_shim_on_c_stack
29-
upcall_call_shim_on_rust_stack
30-
upcall_new_stack
31-
upcall_del_stack
3228
upcall_reset_stack_limit
3329
rust_uv_loop_new
3430
rust_uv_loop_delete

0 commit comments

Comments
 (0)