Skip to content

Commit 9eea673

Browse files
committed
---
yaml --- r: 1660 b: refs/heads/master c: bd9dd5e h: refs/heads/master v: v3
1 parent 0596e40 commit 9eea673

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 73f4728182c62fc47fd501be56cb1898eed8cdc4
2+
refs/heads/master: bd9dd5ed1ab4565141c0c08b4cf2245e451a3eb1

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,7 @@ 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
836-
T_int()) // taskptr
835+
vec(T_int()) // callee
837836
+ _vec.init_elt[TypeRef](T_int(), n as uint);
838837

839838
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,
864863
&hashmap[str, ValueRef] upcalls,
865864
type_names tn, ModuleRef llmod, str name,
866865
vec[ValueRef] args) -> ValueRef {
867-
let int n = _vec.len[ValueRef](args) as int;
866+
let int n = (_vec.len[ValueRef](args) as int) + 1;
868867
let ValueRef llupcall = get_upcall(upcalls, tn, llmod, name, n);
869868
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
870869

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

60916090
upcall_glues =
60926091
_vec.init_fn[ValueRef](bind decl_upcall_glue(llmod, tn, _),
6093-
abi.n_upcall_glues as uint),
6092+
abi.n_upcall_glues + 1 as uint),
60946093
no_op_type_glue = decl_no_op_type_glue(llmod, tn),
60956094
memcpy_glue = decl_memcpy_glue(llmod),
60966095
bzero_glue = decl_bzero_glue(llmod),

0 commit comments

Comments
 (0)