Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index c952a8acf0cac59650fe7177c30756d419f2a6fd..5509dde33b9852c51a1c08c60cc01be7535db397 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -2886,6 +2886,7 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) { |
__ Branch(&miss, ne, a5, Operand(at)); |
__ mov(a2, a4); |
+ __ mov(a3, a1); |
ArrayConstructorStub stub(masm->isolate(), arg_count()); |
__ TailCallStub(&stub); |
@@ -4842,6 +4843,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 |
// ----------------------------------- |
@@ -4864,6 +4866,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ AssertUndefinedOrAllocationSite(a2, a4); |
} |
+ Label subclassing; |
+ __ Branch(&subclassing, ne, a1, Operand(a3)); |
+ |
Label no_info; |
// Get the elements kind and case on that. |
__ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
@@ -4877,6 +4882,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ bind(&no_info); |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
+ |
+ __ bind(&subclassing); |
+ __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); |
} |