Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index 5039c27be3e1c7c27f5c155285e91d08f5fb694e..4da244d0673d9df0736d0dc35ac7944df899e3ae 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -5215,22 +5215,23 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
// Subclassing support. |
__ Bind(&subclassing); |
- __ Push(constructor, new_target); |
- // Adjust argc. |
switch (argument_count()) { |
case ANY: |
case MORE_THAN_ONE: |
- __ add(x0, x0, Operand(2)); |
+ __ Poke(constructor, Operand(x0, LSL, kPointerSizeLog2)); |
+ __ Add(x0, x0, Operand(3)); |
break; |
case NONE: |
- __ Mov(x0, Operand(2)); |
+ __ Poke(constructor, 0 * kPointerSize); |
+ __ Mov(x0, Operand(3)); |
break; |
case ONE: |
- __ Mov(x0, Operand(3)); |
+ __ Poke(constructor, 1 * kPointerSize); |
+ __ Mov(x0, Operand(4)); |
break; |
} |
- __ JumpToExternalReference( |
- ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
+ __ Push(new_target, allocation_site); |
+ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
} |