Skip to content

Commit 341d128

Browse files
committed
Revert "Change the numbering of upcall functions. upcall_0 now calls a function" due to tinderbox failure on win32
This reverts commit bd9dd5e.
1 parent 1a3f533 commit 341d128

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/comp/middle/trans.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ fn decl_upcall_glue(ModuleRef llmod, type_names tn, uint _n) -> ValueRef {
832832
let int n = _n as int;
833833
let str s = abi.upcall_glue_name(n);
834834
let vec[TypeRef] args =
835-
vec(T_int()) // callee
835+
vec(T_int(), // callee
836+
T_int()) // taskptr
836837
+ _vec.init_elt[TypeRef](T_int(), n as uint);
837838

838839
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,
863864
&hashmap[str, ValueRef] upcalls,
864865
type_names tn, ModuleRef llmod, str name,
865866
vec[ValueRef] args) -> ValueRef {
866-
let int n = (_vec.len[ValueRef](args) as int) + 1;
867+
let int n = _vec.len[ValueRef](args) as int;
867868
let ValueRef llupcall = get_upcall(upcalls, tn, llmod, name, n);
868869
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
869870

@@ -6089,7 +6090,7 @@ fn make_glues(ModuleRef llmod, type_names tn) -> @glue_fns {
60896090

60906091
upcall_glues =
60916092
_vec.init_fn[ValueRef](bind decl_upcall_glue(llmod, tn, _),
6092-
abi.n_upcall_glues + 1 as uint),
6093+
abi.n_upcall_glues as uint),
60936094
no_op_type_glue = decl_no_op_type_glue(llmod, tn),
60946095
memcpy_glue = decl_memcpy_glue(llmod),
60956096
bzero_glue = decl_bzero_glue(llmod),

0 commit comments

Comments
 (0)