Skip to content

Commit f3df1bc

Browse files
committed
---
yaml --- r: 4469 b: refs/heads/master c: 4d7f866 h: refs/heads/master i: 4467: f14ba6d v: v3
1 parent b376e26 commit f3df1bc

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
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: 42daeab7df3e0f883e43573389b4e3e3f31c644b
2+
refs/heads/master: 4d7f866eec99d37ef9c3c548ae8916c4f5634717

trunk/src/comp/back/upcall.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import middle::trans_common::T_f32;
55
import middle::trans_common::T_f64;
66
import middle::trans_common::T_fn;
77
import middle::trans_common::T_bool;
8+
import middle::trans_common::T_i1;
89
import middle::trans_common::T_i8;
910
import middle::trans_common::T_i32;
1011
import middle::trans_common::T_int;
@@ -65,22 +66,26 @@ type upcalls =
6566
ivec_resize: ValueRef,
6667
ivec_spill: ValueRef,
6768
ivec_resize_shared: ValueRef,
68-
ivec_spill_shared: ValueRef};
69+
ivec_spill_shared: ValueRef,
70+
cmp_type: ValueRef};
6971

7072
fn declare_upcalls(tn: type_names, tydesc_type: TypeRef,
7173
taskptr_type: TypeRef, llmod: ModuleRef) -> @upcalls {
72-
fn decl(tn: type_names, tydesc_type: TypeRef, taskptr_type: TypeRef,
73-
llmod: ModuleRef, name: str, tys: TypeRef[], rv: TypeRef) ->
74-
ValueRef {
75-
let arg_tys: TypeRef[] = ~[taskptr_type];
74+
fn decl(tn: type_names, llmod: ModuleRef, name: str, tys: TypeRef[],
75+
rv: TypeRef) -> ValueRef {
76+
let arg_tys: TypeRef[] = ~[];
7677
for t: TypeRef in tys { arg_tys += ~[t]; }
7778
let fn_ty = T_fn(arg_tys, rv);
7879
ret trans::decl_cdecl_fn(llmod, "upcall_" + name, fn_ty);
7980
}
80-
let dv = bind decl(tn, tydesc_type, taskptr_type, llmod, _, _, T_void());
81-
let d = bind decl(tn, tydesc_type, taskptr_type, llmod, _, _, _);
82-
// FIXME: Sigh:.. remove this when I fix the typechecker pushdown.
83-
// --pcwalton
81+
fn decl_with_taskptr(taskptr_type: TypeRef, tn: type_names,
82+
llmod: ModuleRef, name: str, tys: TypeRef[],
83+
rv: TypeRef) -> ValueRef {
84+
ret decl(tn, llmod, name, ~[taskptr_type] + tys, rv);
85+
}
86+
let dv = bind decl_with_taskptr(taskptr_type, tn, llmod, _, _, T_void());
87+
let d = bind decl_with_taskptr(taskptr_type, tn, llmod, _, _, _);
88+
let dr = bind decl(tn, llmod, _, _, _);
8489

8590
let empty_vec: TypeRef[] = ~[];
8691
ret @{grow_task: dv("grow_task", ~[T_size_t()]),
@@ -149,7 +154,12 @@ fn declare_upcalls(tn: type_names, tydesc_type: TypeRef,
149154
T_void()),
150155
ivec_spill_shared:
151156
d("ivec_spill_shared", ~[T_ptr(T_opaque_ivec()), T_int()],
152-
T_void())};
157+
T_void()),
158+
cmp_type:
159+
dr("cmp_type", ~[T_ptr(T_i1()), taskptr_type,
160+
T_ptr(tydesc_type), T_ptr(T_ptr(tydesc_type)),
161+
T_ptr(T_i8()), T_ptr(T_i8()), T_int()],
162+
T_void())};
153163
}
154164
//
155165
// Local Variables:

0 commit comments

Comments
 (0)