Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index d9bbb1a76b4b1c3deca007265bc7c42fe33a07aa..72eebe7151057d04117bd7e1b86d61510fd8ddc7 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -5030,26 +5030,26 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
// Subclassing. |
__ bind(&subclassing); |
- __ Push(a1); |
- __ Push(a3); |
- |
- // Adjust argc. |
switch (argument_count()) { |
case ANY: |
case MORE_THAN_ONE: |
- __ li(at, Operand(2)); |
+ __ sll(at, a0, kPointerSizeLog2); |
+ __ addu(at, sp, at); |
+ __ sw(a1, MemOperand(at)); |
+ __ li(at, Operand(3)); |
__ addu(a0, a0, at); |
break; |
case NONE: |
- __ li(a0, Operand(2)); |
+ __ sw(a1, MemOperand(sp, 0 * kPointerSize)); |
+ __ li(a0, Operand(3)); |
break; |
case ONE: |
- __ li(a0, Operand(3)); |
+ __ sw(a1, MemOperand(sp, 1 * kPointerSize)); |
+ __ li(a0, Operand(4)); |
break; |
} |
- |
- __ JumpToExternalReference( |
- ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
+ __ Push(a3, a2); |
+ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
} |