Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index b149df0336cabc2e74804be218e7ba5a33ed6816..d6ca5aa61ddab4b6089d8031e034f8273a9cc4b4 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4821,25 +4821,23 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
__ bind(&subclassing); |
- __ push(r1); |
- __ push(r3); |
- |
- // Adjust argc. |
switch (argument_count()) { |
case ANY: |
case MORE_THAN_ONE: |
- __ add(r0, r0, Operand(2)); |
+ __ str(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
+ __ add(r0, r0, Operand(3)); |
break; |
case NONE: |
- __ mov(r0, Operand(2)); |
+ __ str(r1, MemOperand(sp, 0 * kPointerSize)); |
+ __ mov(r0, Operand(3)); |
break; |
case ONE: |
- __ mov(r0, Operand(3)); |
+ __ str(r1, MemOperand(sp, 1 * kPointerSize)); |
+ __ mov(r0, Operand(4)); |
break; |
} |
- |
- __ JumpToExternalReference( |
- ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
+ __ Push(r3, r2); |
+ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
} |