Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 6ceeb0363d8fb3383f219128b17f5b28af7912f9..68e430d29ba01e2b0c8dc22bd4d113a1ac9060a6 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4639,7 +4639,25 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
__ bind(&subclassing); |
- __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); |
+ __ push(r1); |
+ __ push(r3); |
+ |
+ // Adjust argc. |
+ switch (argument_count()) { |
+ case ANY: |
+ case MORE_THAN_ONE: |
+ __ add(r0, r0, Operand(2)); |
+ break; |
+ case NONE: |
+ __ mov(r0, Operand(2)); |
+ break; |
+ case ONE: |
+ __ mov(r0, Operand(3)); |
+ break; |
+ } |
+ |
+ __ JumpToExternalReference( |
+ ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
} |