Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.cc |
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
| index 2d9c3cd41803b394af0a000cb0dd66a0f495bb3c..2839c7b46a22631fb654ca3d8554f722964fb74a 100644 |
| --- a/src/arm/lithium-codegen-arm.cc |
| +++ b/src/arm/lithium-codegen-arm.cc |
| @@ -2161,12 +2161,12 @@ int LCodeGen::GetNextEmittedBlock() const { |
| template<class InstrType> |
| void LCodeGen::EmitBranch(InstrType instr, Condition cc) { |
| - int right_block = instr->FalseDestination(chunk_); |
| int left_block = instr->TrueDestination(chunk_); |
|
danno
2013/06/21 16:38:04
Why this unrelated change?
|
| + int right_block = instr->FalseDestination(chunk_); |
| int next_block = GetNextEmittedBlock(); |
| - if (right_block == left_block) { |
| + if (right_block == left_block || cc == al) { |
| EmitGoto(left_block); |
| } else if (left_block == next_block) { |
| __ b(NegateCondition(cc), chunk_->GetAssemblyLabel(right_block)); |
| @@ -2184,6 +2184,25 @@ void LCodeGen::DoDebugBreak(LDebugBreak* instr) { |
| } |
| +void LCodeGen::DoIsNumberAndBranch(LIsNumberAndBranch* instr) { |
| + Representation r = instr->hydrogen()->value()->representation(); |
| + if (r.IsSmiOrInteger32() || r.IsDouble()) { |
| + EmitBranch(instr, al); |
| + } else { |
| + ASSERT(r.IsTagged()); |
| + Register reg = ToRegister(instr->value()); |
| + HType type = instr->hydrogen()->value()->type(); |
| + if (type.IsTaggedNumber()) { |
| + EmitBranch(instr, al); |
| + } |
| + __ JumpIfSmi(reg, instr->TrueLabel(chunk_)); |
| + __ ldr(ip, FieldMemOperand(reg, HeapObject::kMapOffset)); |
|
Rodolph Perfetta
2013/06/21 18:32:38
ip shouldn't be used outside the macro assembler.
|
| + __ CompareRoot(ip, Heap::kHeapNumberMapRootIndex); |
| + EmitBranch(instr, eq); |
| + } |
| +} |
| + |
| + |
| void LCodeGen::DoBranch(LBranch* instr) { |
| Representation r = instr->hydrogen()->value()->representation(); |
| if (r.IsInteger32() || r.IsSmi()) { |