Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index 5509dde33b9852c51a1c08c60cc01be7535db397..8e9fd03fb008cb81329886de6d018f6e34e656a4 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -4844,8 +4844,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
// -- a1 : constructor |
// -- a2 : AllocationSite or undefined |
// -- a3 : original constructor |
- // -- sp[0] : return address |
- // -- sp[4] : last argument |
+ // -- sp[0] : last argument |
// ----------------------------------- |
if (FLAG_debug_code) { |
@@ -4883,8 +4882,28 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ bind(&no_info); |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
+ // Subclassing. |
__ bind(&subclassing); |
- __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); |
+ __ Push(a1); |
+ __ Push(a3); |
+ |
+ // Adjust argc. |
+ switch (argument_count()) { |
+ case ANY: |
+ case MORE_THAN_ONE: |
+ __ li(at, Operand(2)); |
+ __ addu(a0, a0, at); |
+ break; |
+ case NONE: |
+ __ li(a0, Operand(2)); |
+ break; |
+ case ONE: |
+ __ li(a0, Operand(3)); |
+ break; |
+ } |
+ |
+ __ JumpToExternalReference( |
+ ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
} |