Skip to content

Commit 50b8997

Browse files
committed
---
yaml --- r: 30455 b: refs/heads/incoming c: 7e9f98a h: refs/heads/master i: 30453: 1c2ef15 30451: a7a6d5f 30447: 51acd32 v: v3
1 parent d40bc6c commit 50b8997

File tree

3 files changed

+7
-33
lines changed

3 files changed

+7
-33
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 5eccf849193f3de8da050eac960bc7f5df104c2f
9+
refs/heads/incoming: 7e9f98a8c95588b7c88e5d4b4db1890e086257ee
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustc/middle/trans/alt.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,12 @@ fn compile_submatch(bcx: block, m: match_, vals: ~[ValueRef],
672672
Result {val: vbegin, _},
673673
Result {bcx, val: vend}) =>
674674
{
675-
let Result {bcx, val: llge} = trans_compare(
676-
bcx, ast::ge, test_val, t, vbegin, t);
677-
let Result {bcx, val: llle} = trans_compare(
678-
bcx, ast::le, test_val, t, vend, t);
675+
let Result {bcx, val: llge} =
676+
compare_scalar_types(bcx, test_val,
677+
vbegin, t, ast::ge);
678+
let Result {bcx, val: llle} =
679+
compare_scalar_types(bcx, test_val, vend,
680+
t, ast::le);
679681
rslt(bcx, And(bcx, llge, llle))
680682
}
681683
}

branches/incoming/src/rustc/middle/trans/base.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -610,34 +610,6 @@ fn iter_structural_ty(cx: block, av: ValueRef, t: ty::t,
610610
return cx;
611611
}
612612

613-
fn trans_compare(cx: block, op: ast::binop, lhs: ValueRef,
614-
_lhs_t: ty::t, rhs: ValueRef, rhs_t: ty::t) -> Result {
615-
let _icx = cx.insn_ctxt("trans_compare");
616-
if ty::type_is_scalar(rhs_t) {
617-
let rs = compare_scalar_types(cx, lhs, rhs, rhs_t, op);
618-
return rslt(rs.bcx, rs.val);
619-
}
620-
621-
// Determine the operation we need.
622-
let llop = {
623-
match op {
624-
ast::eq | ast::ne => C_u8(abi::cmp_glue_op_eq),
625-
ast::lt | ast::ge => C_u8(abi::cmp_glue_op_lt),
626-
ast::le | ast::gt => C_u8(abi::cmp_glue_op_le),
627-
_ => cx.tcx().sess.bug(~"trans_compare got non-comparison-op")
628-
}
629-
};
630-
631-
let cmpval = glue::call_cmp_glue(cx, lhs, rhs, rhs_t, llop);
632-
633-
// Invert the result if necessary.
634-
match op {
635-
ast::eq | ast::lt | ast::le => rslt(cx, cmpval),
636-
ast::ne | ast::ge | ast::gt => rslt(cx, Not(cx, cmpval)),
637-
_ => cx.tcx().sess.bug(~"trans_compare got non-comparison-op")
638-
}
639-
}
640-
641613
fn cast_shift_expr_rhs(cx: block, op: ast::binop,
642614
lhs: ValueRef, rhs: ValueRef) -> ValueRef {
643615
cast_shift_rhs(op, lhs, rhs,

0 commit comments

Comments
 (0)