Index: runtime/vm/intermediate_language_ia32.cc |
=================================================================== |
--- runtime/vm/intermediate_language_ia32.cc (revision 28079) |
+++ runtime/vm/intermediate_language_ia32.cc (working copy) |
@@ -310,14 +310,6 @@ |
const Array& kNoArgumentNames = Object::null_array(); |
const int kNumArgumentsChecked = 2; |
- const Immediate& raw_null = |
- Immediate(reinterpret_cast<intptr_t>(Object::null())); |
- Label check_identity; |
- __ cmpl(Address(ESP, 0 * kWordSize), raw_null); |
- __ j(EQUAL, &check_identity); |
- __ cmpl(Address(ESP, 1 * kWordSize), raw_null); |
- __ j(EQUAL, &check_identity); |
- |
ICData& equality_ic_data = ICData::ZoneHandle(); |
if (compiler->is_optimizing() && FLAG_propagate_ic_data) { |
ASSERT(!original_ic_data.IsNull()); |
@@ -344,39 +336,6 @@ |
kNoArgumentNames, |
locs, |
equality_ic_data); |
- Label check_ne; |
- __ jmp(&check_ne); |
- |
- __ Bind(&check_identity); |
- Label equality_done; |
- if (compiler->is_optimizing()) { |
- // No need to update IC data. |
- Label is_true; |
- __ popl(EAX); |
- __ popl(EDX); |
- __ cmpl(EAX, EDX); |
- __ j(EQUAL, &is_true); |
- __ LoadObject(EAX, Bool::Get(kind != Token::kEQ)); |
- __ jmp(&equality_done); |
- __ Bind(&is_true); |
- __ LoadObject(EAX, Bool::Get(kind == Token::kEQ)); |
- if (kind == Token::kNE) { |
- // Skip not-equal result conversion. |
- __ jmp(&equality_done); |
- } |
- } else { |
- // Call stub, load IC data in register. The stub will update ICData if |
- // necessary. |
- Register ic_data_reg = locs->temp(0).reg(); |
- ASSERT(ic_data_reg == ECX); // Stub depends on it. |
- __ LoadObject(ic_data_reg, equality_ic_data); |
- compiler->GenerateCall(token_pos, |
- &StubCode::EqualityWithNullArgLabel(), |
- PcDescriptors::kRuntimeCall, |
- locs); |
- __ Drop(2); |
- } |
- __ Bind(&check_ne); |
if (kind == Token::kNE) { |
Label true_label, done; |
// Negate the condition: true label returns false and vice versa. |
@@ -388,7 +347,6 @@ |
__ LoadObject(EAX, Bool::False()); |
__ Bind(&done); |
} |
- __ Bind(&equality_done); |
} |
@@ -562,35 +520,10 @@ |
ASSERT(!ic_data.IsNull() && (ic_data.NumberOfChecks() > 0)); |
Register left = locs->in(0).reg(); |
Register right = locs->in(1).reg(); |
- const Immediate& raw_null = |
- Immediate(reinterpret_cast<intptr_t>(Object::null())); |
- Label done, identity_compare, non_null_compare; |
- __ cmpl(right, raw_null); |
- __ j(EQUAL, &identity_compare, Assembler::kNearJump); |
- __ cmpl(left, raw_null); |
- __ j(NOT_EQUAL, &non_null_compare, Assembler::kNearJump); |
- // Comparison with NULL is "===". |
- __ Bind(&identity_compare); |
- __ cmpl(left, right); |
- Condition cond = TokenKindToSmiCondition(kind); |
- if (branch != NULL) { |
- branch->EmitBranchOnCondition(compiler, cond); |
- } else { |
- Register result = locs->out().reg(); |
- Label load_true; |
- __ j(cond, &load_true, Assembler::kNearJump); |
- __ LoadObject(result, Bool::False()); |
- __ jmp(&done); |
- __ Bind(&load_true); |
- __ LoadObject(result, Bool::True()); |
- } |
- __ jmp(&done); |
- __ Bind(&non_null_compare); // Receiver is not null. |
__ pushl(left); |
__ pushl(right); |
EmitEqualityAsPolymorphicCall(compiler, ic_data, locs, branch, kind, |
deopt_id, token_pos); |
- __ Bind(&done); |
} |