diff options
| author | Michael Sullivan <sully@msully.net> | 2011-08-15 17:33:08 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2011-08-15 17:36:28 -0700 |
| commit | 14d85ca87a076d674e4a434d4c27e0fed8335f19 (patch) | |
| tree | be89122889fa7cc063e374126df9aa07b78fcaa8 /src/comp | |
| parent | d55048ec5cd40c1eafdd2f7fcee8d3b97697066f (diff) | |
| download | rust-14d85ca87a076d674e4a434d4c27e0fed8335f19.tar.gz rust-14d85ca87a076d674e4a434d4c27e0fed8335f19.zip | |
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.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index b257e8e1375..e2f9f7682e1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -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}; |
