Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index c24883fd78466f22314ebec29b2a0f82f19c395e..077abbb1e6206edd49853497c25a39a290554b09 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -4701,27 +4701,26 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
// Subclassing. |
__ bind(&subclassing); |
- __ pop(ecx); // return address. |
- __ push(edi); |
- __ push(edx); |
- |
- // Adjust argc. |
switch (argument_count()) { |
case ANY: |
case MORE_THAN_ONE: |
- __ add(eax, Immediate(2)); |
+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); |
+ __ add(eax, Immediate(3)); |
break; |
case NONE: |
- __ mov(eax, Immediate(2)); |
+ __ mov(Operand(esp, 1 * kPointerSize), edi); |
+ __ mov(eax, Immediate(3)); |
break; |
case ONE: |
- __ mov(eax, Immediate(3)); |
+ __ mov(Operand(esp, 2 * kPointerSize), edi); |
+ __ mov(eax, Immediate(4)); |
break; |
} |
- |
- __ push(ecx); |
- __ JumpToExternalReference( |
- ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
+ __ PopReturnAddressTo(ecx); |
+ __ Push(edx); |
+ __ Push(ebx); |
+ __ PushReturnAddressFrom(ecx); |
+ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
} |