diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-05-27 15:19:38 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-05-27 15:20:58 -0700 |
| commit | 8cfc388d40673b21282dcdf656cbff3ac8166eca (patch) | |
| tree | 2934640774ac780fa522c9e78dd046a15e08dc8f /src/comp | |
| parent | d49998f0ed9b0a239b40d30ccfde750f8439cac4 (diff) | |
| download | rust-8cfc388d40673b21282dcdf656cbff3ac8166eca.tar.gz rust-8cfc388d40673b21282dcdf656cbff3ac8166eca.zip | |
Switched calling conventions so that spawn with multiple arguments works.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 9f3d4b8b3b3..835098c3d7f 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -5949,7 +5949,6 @@ fn mk_spawn_wrapper(&@block_ctxt cx, &ty::t args_ty) -> result { auto llmod = cx.fcx.lcx.ccx.llmod; let TypeRef args_ty_tref = type_of(cx.fcx.lcx.ccx, cx.sp, args_ty); - //let TypeRef wrapper_fn_type = T_fn([args_ty_tref], T_void()); let TypeRef wrapper_fn_type = type_of_fn(cx.fcx.lcx.ccx, cx.sp, ast::proto_fn, @@ -5963,8 +5962,8 @@ fn mk_spawn_wrapper(&@block_ctxt cx, ty_str(cx.fcx.lcx.ccx.tn, wrapper_fn_type)); // TODO: construct a name based on tname - auto llfndecl = decl_cdecl_fn(llmod, "spawn_wrap", - wrapper_fn_type); + auto llfndecl = decl_fastcall_fn(llmod, "spawn_wrap", + wrapper_fn_type); log_err #fmt("spawn wrapper decl type: %s", val_str(cx.fcx.lcx.ccx.tn, llfndecl)); @@ -6028,10 +6027,10 @@ fn mk_spawn_wrapper(&@block_ctxt cx, i += 1; } - fbcx.build.Call(llfn, - child_args); + fbcx.build.FastCall(llfn, + child_args); fbcx.build.RetVoid(); - + finish_fn(fcx, fbcx.llbb); // TODO: make sure we clean up everything we need to. |
