Index: src/x64/lithium-x64.cc |
=================================================================== |
--- src/x64/lithium-x64.cc (revision 8207) |
+++ src/x64/lithium-x64.cc (working copy) |
@@ -1051,16 +1051,15 @@ |
LInstruction* LChunkBuilder::DoTest(HTest* instr) { |
HValue* v = instr->value(); |
- if (!v->EmitAtUses()) { |
- return new LBranch(UseRegisterAtStart(v)); |
- } else if (v->IsClassOfTest()) { |
+ if (!v->EmitAtUses()) return new LBranch(UseRegisterAtStart(v)); |
+ ASSERT(!v->HasSideEffects()); |
+ if (v->IsClassOfTest()) { |
HClassOfTest* compare = HClassOfTest::cast(v); |
ASSERT(compare->value()->representation().IsTagged()); |
return new LClassOfTestAndBranch(UseTempRegister(compare->value()), |
TempRegister()); |
} else if (v->IsCompare()) { |
HCompare* compare = HCompare::cast(v); |
- Token::Value op = compare->token(); |
HValue* left = compare->left(); |
HValue* right = compare->right(); |
Representation r = compare->GetInputRepresentation(); |
@@ -1069,19 +1068,12 @@ |
ASSERT(right->representation().IsInteger32()); |
return new LCmpIDAndBranch(UseRegisterAtStart(left), |
UseOrConstantAtStart(right)); |
- } else if (r.IsDouble()) { |
+ } else { |
+ ASSERT(r.IsDouble()); |
ASSERT(left->representation().IsDouble()); |
ASSERT(right->representation().IsDouble()); |
return new LCmpIDAndBranch(UseRegisterAtStart(left), |
UseRegisterAtStart(right)); |
- } else { |
- ASSERT(left->representation().IsTagged()); |
- ASSERT(right->representation().IsTagged()); |
- bool reversed = op == Token::GT || op == Token::LTE; |
- LOperand* left_operand = UseFixed(left, reversed ? rax : rdx); |
- LOperand* right_operand = UseFixed(right, reversed ? rdx : rax); |
- LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, right_operand); |
- return MarkAsCall(result, instr); |
} |
} else if (v->IsIsSmi()) { |
HIsSmi* compare = HIsSmi::cast(v); |
@@ -1119,12 +1111,6 @@ |
HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); |
return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), |
UseRegisterAtStart(compare->right())); |
- } else if (v->IsInstanceOf()) { |
- HInstanceOf* instance_of = HInstanceOf::cast(v); |
- LInstanceOfAndBranch* result = |
- new LInstanceOfAndBranch(UseFixed(instance_of->left(), rax), |
- UseFixed(instance_of->right(), rdx)); |
- return MarkAsCall(result, instr); |
} else if (v->IsTypeofIs()) { |
HTypeofIs* typeof_is = HTypeofIs::cast(v); |
return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); |