Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 9d729597fa9e25406b3418960824af0c584ae25d..6ec81452769e06fa44aca00672a171555af53454 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -1848,8 +1848,12 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
__ bind(&adaptor_frame); |
__ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
if (has_new_target()) { |
+ __ cmp(r1, Operand(Smi::FromInt(0))); |
+ Label skip_decrement; |
+ __ b(eq, &skip_decrement); |
// Subtract 1 from smi-tagged arguments count. |
__ sub(r1, r1, Operand(2)); |
+ __ bind(&skip_decrement); |
} |
__ str(r1, MemOperand(sp, 0)); |
__ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); |