Skip to content

Commit 23880da

Browse files
committed
rustc: Remove the cmp type upcall
1 parent cd8ec6d commit 23880da

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

src/rustc/back/abi.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ const tydesc_field_shape: uint = 6u;
4343
const tydesc_field_shape_tables: uint = 7u;
4444
const n_tydesc_fields: uint = 8u;
4545

46-
const cmp_glue_op_eq: uint = 0u;
47-
48-
const cmp_glue_op_lt: uint = 1u;
49-
50-
const cmp_glue_op_le: uint = 2u;
51-
5246
// The two halves of a closure: code and environment.
5347
const fn_field_code: uint = 0u;
5448
const fn_field_box: uint = 1u;

src/rustc/back/upcall.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type upcalls =
1818
mark: ValueRef,
1919
str_new_uniq: ValueRef,
2020
str_new_shared: ValueRef,
21-
cmp_type: ValueRef,
2221
log_type: ValueRef,
2322
call_shim_on_c_stack: ValueRef,
2423
call_shim_on_rust_stack: ValueRef,
@@ -74,12 +73,6 @@ fn declare_upcalls(targ_cfg: @session::config,
7473
str_new_shared:
7574
nothrow(d(~"str_new_shared", ~[T_ptr(T_i8()), int_t],
7675
T_ptr(T_i8()))),
77-
cmp_type:
78-
dv(~"cmp_type",
79-
~[T_ptr(T_i1()), T_ptr(tydesc_type),
80-
T_ptr(T_i8()),
81-
T_ptr(T_i8()),
82-
T_i8()]),
8376
log_type:
8477
dv(~"log_type", ~[T_ptr(tydesc_type),
8578
T_ptr(T_i8()), T_i32()]),

src/rustc/middle/trans/glue.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -253,27 +253,6 @@ fn call_tydesc_glue(++cx: block, v: ValueRef, t: ty::t, field: uint)
253253
return cx;
254254
}
255255

256-
fn call_cmp_glue(bcx: block, lhs: ValueRef, rhs: ValueRef, t: ty::t,
257-
llop: ValueRef) -> ValueRef {
258-
// We can't use call_tydesc_glue_full() and friends here because compare
259-
// glue has a special signature.
260-
let _icx = bcx.insn_ctxt("call_cmp_glue");
261-
262-
let lllhs = spill_if_immediate(bcx, lhs, t);
263-
let llrhs = spill_if_immediate(bcx, rhs, t);
264-
265-
let llrawlhsptr = BitCast(bcx, lllhs, T_ptr(T_i8()));
266-
let llrawrhsptr = BitCast(bcx, llrhs, T_ptr(T_i8()));
267-
let lltydesc = get_tydesc_simple(bcx.ccx(), t);
268-
269-
let llfn = bcx.ccx().upcalls.cmp_type;
270-
271-
let llcmpresultptr = alloca(bcx, T_i1());
272-
Call(bcx, llfn, ~[llcmpresultptr, lltydesc,
273-
llrawlhsptr, llrawrhsptr, llop]);
274-
return Load(bcx, llcmpresultptr);
275-
}
276-
277256
fn make_visit_glue(bcx: block, v: ValueRef, t: ty::t) {
278257
let _icx = bcx.insn_ctxt("make_visit_glue");
279258
let mut bcx = bcx;

0 commit comments

Comments
 (0)