Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 74705f97efdd8947c992589abb81974d574a789d..795469998372545bfe05ac0d0f58c1ea4c7bd947 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -2808,6 +2808,7 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) { |
__ Branch(&miss, ne, t1, Operand(at)); |
__ mov(a2, t0); |
+ __ mov(a3, a1); |
ArrayConstructorStub stub(masm->isolate(), arg_count()); |
__ TailCallStub(&stub); |
@@ -4799,6 +4800,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
// -- a0 : argc (only if argument_count() == ANY) |
// -- a1 : constructor |
// -- a2 : AllocationSite or undefined |
+ // -- a3 : Original constructor |
// -- sp[0] : return address |
// -- sp[4] : last argument |
// ----------------------------------- |
@@ -4821,6 +4823,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ AssertUndefinedOrAllocationSite(a2, t0); |
} |
+ Label subclassing; |
+ __ Branch(&subclassing, ne, a1, Operand(a3)); |
+ |
Label no_info; |
// Get the elements kind and case on that. |
__ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
@@ -4834,6 +4839,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ bind(&no_info); |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
+ |
+ __ bind(&subclassing); |
+ __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); |
} |