rustc: Remove the cmp type upcall
This commit is contained in:
@@ -43,12 +43,6 @@ const tydesc_field_shape: uint = 6u;
|
|||||||
const tydesc_field_shape_tables: uint = 7u;
|
const tydesc_field_shape_tables: uint = 7u;
|
||||||
const n_tydesc_fields: uint = 8u;
|
const n_tydesc_fields: uint = 8u;
|
||||||
|
|
||||||
const cmp_glue_op_eq: uint = 0u;
|
|
||||||
|
|
||||||
const cmp_glue_op_lt: uint = 1u;
|
|
||||||
|
|
||||||
const cmp_glue_op_le: uint = 2u;
|
|
||||||
|
|
||||||
// The two halves of a closure: code and environment.
|
// The two halves of a closure: code and environment.
|
||||||
const fn_field_code: uint = 0u;
|
const fn_field_code: uint = 0u;
|
||||||
const fn_field_box: uint = 1u;
|
const fn_field_box: uint = 1u;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ type upcalls =
|
|||||||
mark: ValueRef,
|
mark: ValueRef,
|
||||||
str_new_uniq: ValueRef,
|
str_new_uniq: ValueRef,
|
||||||
str_new_shared: ValueRef,
|
str_new_shared: ValueRef,
|
||||||
cmp_type: ValueRef,
|
|
||||||
log_type: ValueRef,
|
log_type: ValueRef,
|
||||||
call_shim_on_c_stack: ValueRef,
|
call_shim_on_c_stack: ValueRef,
|
||||||
call_shim_on_rust_stack: ValueRef,
|
call_shim_on_rust_stack: ValueRef,
|
||||||
@@ -74,12 +73,6 @@ fn declare_upcalls(targ_cfg: @session::config,
|
|||||||
str_new_shared:
|
str_new_shared:
|
||||||
nothrow(d(~"str_new_shared", ~[T_ptr(T_i8()), int_t],
|
nothrow(d(~"str_new_shared", ~[T_ptr(T_i8()), int_t],
|
||||||
T_ptr(T_i8()))),
|
T_ptr(T_i8()))),
|
||||||
cmp_type:
|
|
||||||
dv(~"cmp_type",
|
|
||||||
~[T_ptr(T_i1()), T_ptr(tydesc_type),
|
|
||||||
T_ptr(T_i8()),
|
|
||||||
T_ptr(T_i8()),
|
|
||||||
T_i8()]),
|
|
||||||
log_type:
|
log_type:
|
||||||
dv(~"log_type", ~[T_ptr(tydesc_type),
|
dv(~"log_type", ~[T_ptr(tydesc_type),
|
||||||
T_ptr(T_i8()), T_i32()]),
|
T_ptr(T_i8()), T_i32()]),
|
||||||
|
|||||||
@@ -253,27 +253,6 @@ fn call_tydesc_glue(++cx: block, v: ValueRef, t: ty::t, field: uint)
|
|||||||
return cx;
|
return cx;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call_cmp_glue(bcx: block, lhs: ValueRef, rhs: ValueRef, t: ty::t,
|
|
||||||
llop: ValueRef) -> ValueRef {
|
|
||||||
// We can't use call_tydesc_glue_full() and friends here because compare
|
|
||||||
// glue has a special signature.
|
|
||||||
let _icx = bcx.insn_ctxt("call_cmp_glue");
|
|
||||||
|
|
||||||
let lllhs = spill_if_immediate(bcx, lhs, t);
|
|
||||||
let llrhs = spill_if_immediate(bcx, rhs, t);
|
|
||||||
|
|
||||||
let llrawlhsptr = BitCast(bcx, lllhs, T_ptr(T_i8()));
|
|
||||||
let llrawrhsptr = BitCast(bcx, llrhs, T_ptr(T_i8()));
|
|
||||||
let lltydesc = get_tydesc_simple(bcx.ccx(), t);
|
|
||||||
|
|
||||||
let llfn = bcx.ccx().upcalls.cmp_type;
|
|
||||||
|
|
||||||
let llcmpresultptr = alloca(bcx, T_i1());
|
|
||||||
Call(bcx, llfn, ~[llcmpresultptr, lltydesc,
|
|
||||||
llrawlhsptr, llrawrhsptr, llop]);
|
|
||||||
return Load(bcx, llcmpresultptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn make_visit_glue(bcx: block, v: ValueRef, t: ty::t) {
|
fn make_visit_glue(bcx: block, v: ValueRef, t: ty::t) {
|
||||||
let _icx = bcx.insn_ctxt("make_visit_glue");
|
let _icx = bcx.insn_ctxt("make_visit_glue");
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
|
|||||||
Reference in New Issue
Block a user