Skip to content

rt: Remove four unused upcalls #10161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions src/rt/rust_upcall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/rt/rustrt.def.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down