Make bind glue do an llvm tail call to the target. Closes #2.
Now, llvm probably won't actually *emit* a tail call with the compiler options and configuration we have, but this should punt it over to the more general "do tail calls" bug.
This commit is contained in:
parent
d55048ec5c
commit
14d85ca87a
1 changed files with 1 additions and 1 deletions
|
|
@ -4436,7 +4436,7 @@ fn trans_bind_thunk(cx: &@local_ctxt, sp: &span, incoming_fty: &ty::t,
|
|||
type_of_fn_from_ty(bcx_ccx(bcx), sp, outgoing_fty, ty_param_count);
|
||||
lltargetfn = bcx.build.PointerCast(lltargetfn, T_ptr(T_ptr(lltargetty)));
|
||||
lltargetfn = bcx.build.Load(lltargetfn);
|
||||
bcx.build.FastCall(lltargetfn, llargs);
|
||||
llvm::LLVMSetTailCall(bcx.build.FastCall(lltargetfn, llargs), 1);
|
||||
bcx.build.RetVoid();
|
||||
finish_fn(fcx, lltop);
|
||||
ret {val: llthunk, ty: llthunk_ty};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue