Index: src/arm/lithium-codegen-arm.cc |
=================================================================== |
--- src/arm/lithium-codegen-arm.cc (revision 6703) |
+++ src/arm/lithium-codegen-arm.cc (working copy) |
@@ -647,7 +647,7 @@ |
return; |
} |
- if (cc == kNoCondition) { |
+ if (cc == al) { |
if (FLAG_trap_on_deopt) __ stop("trap_on_deopt"); |
__ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
} else { |
@@ -1188,8 +1188,8 @@ |
__ tst(left, Operand(left)); |
__ b(ne, &done); |
if (instr->InputAt(1)->IsConstantOperand()) { |
- if (ToInteger32(LConstantOperand::cast(instr->InputAt(1))) < 0) { |
- DeoptimizeIf(kNoCondition, instr->environment()); |
+ if (ToInteger32(LConstantOperand::cast(instr->InputAt(1))) <= 0) { |
+ DeoptimizeIf(al, instr->environment()); |
} |
} else { |
// Test the non-zero operand for negative sign. |
@@ -3778,6 +3778,55 @@ |
} |
+void LCodeGen::DoIsConstructCall(LIsConstructCall* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Label true_label; |
+ Label false_label; |
+ Label done; |
+ |
+ EmitIsConstructCall(result, scratch0()); |
+ __ b(eq, &true_label); |
+ |
+ __ LoadRoot(result, Heap::kFalseValueRootIndex); |
+ __ b(&done); |
+ |
+ |
+ __ bind(&true_label); |
+ __ LoadRoot(result, Heap::kTrueValueRootIndex); |
+ |
+ __ bind(&done); |
+} |
+ |
+ |
+void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |
+ Register temp1 = ToRegister(instr->TempAt(0)); |
+ int true_block = chunk_->LookupDestination(instr->true_block_id()); |
+ int false_block = chunk_->LookupDestination(instr->false_block_id()); |
+ |
+ EmitIsConstructCall(temp1, scratch0()); |
+ EmitBranch(true_block, false_block, eq); |
+} |
+ |
+ |
+void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) { |
+ ASSERT(!temp1.is(temp2)); |
+ // Get the frame pointer for the calling frame. |
+ __ ldr(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
+ |
+ // Skip the arguments adaptor frame if it exists. |
+ Label check_frame_marker; |
+ __ ldr(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset)); |
+ __ cmp(temp2, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
+ __ b(ne, &check_frame_marker); |
+ __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset)); |
+ |
+ // Check the marker in the calling frame. |
+ __ bind(&check_frame_marker); |
+ __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); |
+ __ cmp(temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); |
+} |
+ |
+ |
void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
// No code for lazy bailout instruction. Used to capture environment after a |
// call for populating the safepoint data with deoptimization data. |
@@ -3785,7 +3834,7 @@ |
void LCodeGen::DoDeoptimize(LDeoptimize* instr) { |
- DeoptimizeIf(kNoCondition, instr->environment()); |
+ DeoptimizeIf(al, instr->environment()); |
} |