Skip to content

Commit 12e7feb

Browse files
committed
The T_taskptr is already included in the n_args, don't add it twice.
1 parent b9bde9f commit 12e7feb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/comp/middle/trans.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,11 @@ fn decl_upcall_glue(ModuleRef llmod, type_names tn, uint _n) -> ValueRef {
841841
}
842842

843843
fn get_upcall(&hashmap[str, ValueRef] upcalls,
844-
type_names tn, ModuleRef llmod,
845-
str name, int n_args) -> ValueRef {
844+
ModuleRef llmod, str name, int n_args) -> ValueRef {
846845
if (upcalls.contains_key(name)) {
847846
ret upcalls.get(name);
848847
}
849-
auto inputs = vec(T_taskptr(tn));
850-
inputs += _vec.init_elt[TypeRef](T_int(), n_args as uint);
848+
auto inputs = _vec.init_elt[TypeRef](T_int(), n_args as uint);
851849
auto output = T_int();
852850
auto f = decl_cdecl_fn(llmod, name, T_fn(inputs, output));
853851
upcalls.insert(name, f);
@@ -868,7 +866,7 @@ fn trans_upcall2(builder b, @glue_fns glues,
868866
type_names tn, ModuleRef llmod, str name,
869867
vec[ValueRef] args) -> ValueRef {
870868
let int n = (_vec.len[ValueRef](args) as int);
871-
let ValueRef llupcall = get_upcall(upcalls, tn, llmod, name, n);
869+
let ValueRef llupcall = get_upcall(upcalls, llmod, name, n);
872870
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
873871

874872
let ValueRef llglue = glues.upcall_glues.(n);

0 commit comments

Comments
 (0)