Pass the task pointer as just another i32.

This commit is contained in:
Rafael Ávila de Espíndola 2011-03-09 15:35:54 -05:00
parent 10d8b4e861
commit 02f669ca67

View file

@ -832,7 +832,7 @@ fn decl_upcall_glue(ModuleRef llmod, type_names tn, uint _n) -> ValueRef {
let str s = abi.upcall_glue_name(n);
let vec[TypeRef] args =
vec(T_int(), // callee
T_taskptr(tn)) // taskptr
T_int()) // taskptr
+ _vec.init_elt[TypeRef](T_int(), n as uint);
ret decl_fastcall_fn(llmod, s, T_fn(args, T_int()));
@ -856,7 +856,8 @@ fn trans_upcall(@block_ctxt cx, str name, vec[ValueRef] args) -> result {
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
let ValueRef llglue = cx.fcx.ccx.glues.upcall_glues.(n);
let vec[ValueRef] call_args = vec(llupcall, cx.fcx.lltaskptr);
let vec[ValueRef] call_args = vec(llupcall);
call_args += cx.build.PtrToInt(cx.fcx.lltaskptr, T_int());
for (ValueRef a in args) {
call_args += cx.build.ZExtOrBitCast(a, T_int());