Revert "Change the numbering of upcall functions. upcall_0 now calls a function" due to tinderbox failure on win32

This reverts commit bd9dd5ed1a.
This commit is contained in:
Patrick Walton 2011-03-15 17:20:00 -07:00
parent 1a3f533d28
commit 341d128ad3

View file

@ -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),