aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-15 17:20:00 -0700
committerPatrick Walton <[email protected]>2011-03-15 17:20:00 -0700
commit341d128ad3994692063be89728a2dd2df2833be5 (patch)
treed66341fba56a48bef024c9b0081a911dc4caf90d /src
parentTypo: FIXE -> FIXME (diff)
downloadrust-341d128ad3994692063be89728a2dd2df2833be5.tar.xz
rust-341d128ad3994692063be89728a2dd2df2833be5.zip
Revert "Change the numbering of upcall functions. upcall_0 now calls a function" due to tinderbox failure on win32
This reverts commit bd9dd5ed1ab4565141c0c08b4cf2245e451a3eb1.
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/trans.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 0daa2b78..4fab3454 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -832,7 +832,8 @@ 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
+ vec(T_int(), // callee
+ T_int()) // taskptr
+ _vec.init_elt[TypeRef](T_int(), n as uint);
ret decl_fastcall_fn(llmod, s, T_fn(args, T_int()));
@@ -863,7 +864,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) + 1;
+ let int n = _vec.len[ValueRef](args) as int;
let ValueRef llupcall = get_upcall(upcalls, tn, llmod, name, n);
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
@@ -6089,7 +6090,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 + 1 as uint),
+ abi.n_upcall_glues 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),