Skip to content

Commit

Permalink
librustc: Remove calls to upcall_reset_stack_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton committed Oct 29, 2013
1 parent 7e77bf1 commit 8eb3e38
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/librustc/back/upcall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,13 @@ use lib::llvm::{ModuleRef, ValueRef};
pub struct Upcalls {
trace: ValueRef,
rust_personality: ValueRef,
reset_stack_limit: ValueRef
}

macro_rules! upcall (
(fn $name:ident($($arg:expr),+) -> $ret:expr) => ({
let fn_ty = Type::func([ $($arg),* ], &$ret);
base::decl_cdecl_fn(llmod, ~"upcall_" + stringify!($name), fn_ty)
});
(nothrow fn $name:ident($($arg:expr),+) -> $ret:expr) => ({
let fn_ty = Type::func([ $($arg),* ], &$ret);
let decl = base::decl_cdecl_fn(llmod, ~"upcall_" + stringify!($name), fn_ty);
base::set_no_unwind(decl);
decl
});
(nothrow fn $name:ident -> $ret:expr) => ({
let fn_ty = Type::func([], &$ret);
let decl = base::decl_cdecl_fn(llmod, ~"upcall_" + stringify!($name), fn_ty);
Expand All @@ -46,6 +39,5 @@ pub fn declare_upcalls(targ_cfg: @session::config, llmod: ModuleRef) -> @Upcalls
@Upcalls {
trace: upcall!(fn trace(opaque_ptr, opaque_ptr, int_ty) -> Type::void()),
rust_personality: upcall!(nothrow fn rust_personality -> Type::i32()),
reset_stack_limit: upcall!(nothrow fn reset_stack_limit -> Type::void())
}
}
5 changes: 0 additions & 5 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,11 +1012,6 @@ pub fn get_landing_pad(bcx: @mut Block) -> BasicBlockRef {
// The landing pad block is a cleanup
SetCleanup(pad_bcx, llretval);

// Because we may have unwound across a stack boundary, we must call into
// the runtime to figure out which stack segment we are on and place the
// stack limit back into the TLS.
Call(pad_bcx, bcx.ccx().upcalls.reset_stack_limit, [], []);

// We store the retval in a function-central alloca, so that calls to
// Resume can find it.
match bcx.fcx.personality {
Expand Down

4 comments on commit 8eb3e38

@bors
Copy link
Contributor

@bors bors commented on 8eb3e38 Nov 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at pcwalton@8eb3e38

@bors
Copy link
Contributor

@bors bors commented on 8eb3e38 Nov 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pcwalton/rust/reset-stack-limit = 8eb3e38 into auto

@bors
Copy link
Contributor

@bors bors commented on 8eb3e38 Nov 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pcwalton/rust/reset-stack-limit = 8eb3e38 merged ok, testing candidate = fb396c43

@bors
Copy link
Contributor

@bors bors commented on 8eb3e38 Nov 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.