diff options
| author | Rafael Ávila de Espíndola <[email protected]> | 2011-03-15 16:24:03 -0400 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <[email protected]> | 2011-03-15 16:24:03 -0400 |
| commit | bd9dd5ed1ab4565141c0c08b4cf2245e451a3eb1 (patch) | |
| tree | c37d97e049865c9b2bfa2e530cd2a041c36b4355 /src/comp | |
| parent | Append 'svn' to version in dll name, hopefully to bring win32 up again. (diff) | |
| download | rust-bd9dd5ed1ab4565141c0c08b4cf2245e451a3eb1.tar.xz rust-bd9dd5ed1ab4565141c0c08b4cf2245e451a3eb1.zip | |
Change the numbering of upcall functions. upcall_0 now calls a function
with no arguments. This is still preparation for calling functions that
don't take a rust task argument.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 4fab3454..0daa2b78 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -832,8 +832,7 @@ fn decl_upcall_glue(ModuleRef llmod, type_names tn, uint _n) -> ValueRef { let int n = _n as int; let str s = abi.upcall_glue_name(n); let vec[TypeRef] args = - vec(T_int(), // callee - T_int()) // taskptr + vec(T_int()) // callee + _vec.init_elt[TypeRef](T_int(), n as uint); ret decl_fastcall_fn(llmod, s, T_fn(args, T_int())); @@ -864,7 +863,7 @@ fn trans_upcall2(builder b, @glue_fns glues, ValueRef lltaskptr, &hashmap[str, ValueRef] upcalls, type_names tn, ModuleRef llmod, str name, vec[ValueRef] args) -> ValueRef { - let int n = _vec.len[ValueRef](args) as int; + let int n = (_vec.len[ValueRef](args) as int) + 1; let ValueRef llupcall = get_upcall(upcalls, tn, llmod, name, n); llupcall = llvm.LLVMConstPointerCast(llupcall, T_int()); @@ -6090,7 +6089,7 @@ fn make_glues(ModuleRef llmod, type_names tn) -> @glue_fns { upcall_glues = _vec.init_fn[ValueRef](bind decl_upcall_glue(llmod, tn, _), - abi.n_upcall_glues as uint), + abi.n_upcall_glues + 1 as uint), no_op_type_glue = decl_no_op_type_glue(llmod, tn), memcpy_glue = decl_memcpy_glue(llmod), bzero_glue = decl_bzero_glue(llmod), |