Index: src/ppc/code-stubs-ppc.cc |
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc |
index 803e0050da24d09aa5ac709b517463942a004b42..11d565531456e96b7a11e0de005a0850bbd33eb1 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -1881,14 +1881,13 @@ void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { |
__ cmp(r4, r8); |
__ bne(miss); |
- __ mov(r3, Operand(arg_count())); |
- |
// Increment the call count for monomorphic function calls. |
IncrementCallCount(masm, r5, r6, r0); |
__ mr(r5, r7); |
__ mr(r6, r4); |
- ArrayConstructorStub stub(masm->isolate(), arg_count()); |
+ __ mov(r3, Operand(arg_count())); |
+ ArrayConstructorStub stub(masm->isolate()); |
__ TailCallStub(&stub); |
} |
@@ -3862,30 +3861,19 @@ void CommonArrayConstructorStub::GenerateStubsAheadOfTime(Isolate* isolate) { |
void ArrayConstructorStub::GenerateDispatchToArrayStub( |
MacroAssembler* masm, AllocationSiteOverrideMode mode) { |
- if (argument_count() == ANY) { |
- Label not_zero_case, not_one_case; |
- __ cmpi(r3, Operand::Zero()); |
- __ bne(¬_zero_case); |
- CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode); |
+ Label not_zero_case, not_one_case; |
+ __ cmpi(r3, Operand::Zero()); |
+ __ bne(¬_zero_case); |
+ CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode); |
- __ bind(¬_zero_case); |
- __ cmpi(r3, Operand(1)); |
- __ bgt(¬_one_case); |
- CreateArrayDispatchOneArgument(masm, mode); |
+ __ bind(¬_zero_case); |
+ __ cmpi(r3, Operand(1)); |
+ __ bgt(¬_one_case); |
+ CreateArrayDispatchOneArgument(masm, mode); |
- __ bind(¬_one_case); |
- ArrayNArgumentsConstructorStub stub(masm->isolate()); |
- __ TailCallStub(&stub); |
- } else if (argument_count() == NONE) { |
- CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode); |
- } else if (argument_count() == ONE) { |
- CreateArrayDispatchOneArgument(masm, mode); |
- } else if (argument_count() == MORE_THAN_ONE) { |
- ArrayNArgumentsConstructorStub stub(masm->isolate()); |
- __ TailCallStub(&stub); |
- } else { |
- UNREACHABLE(); |
- } |
+ __ bind(¬_one_case); |
+ ArrayNArgumentsConstructorStub stub(masm->isolate()); |
+ __ TailCallStub(&stub); |
} |
@@ -3937,23 +3925,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
__ bind(&subclassing); |
- switch (argument_count()) { |
- case ANY: |
- case MORE_THAN_ONE: |
- __ ShiftLeftImm(r0, r3, Operand(kPointerSizeLog2)); |
- __ StorePX(r4, MemOperand(sp, r0)); |
- __ addi(r3, r3, Operand(3)); |
- break; |
- case NONE: |
- __ StoreP(r4, MemOperand(sp, 0 * kPointerSize)); |
- __ li(r3, Operand(3)); |
- break; |
- case ONE: |
- __ StoreP(r4, MemOperand(sp, 1 * kPointerSize)); |
- __ li(r3, Operand(4)); |
- break; |
- } |
- |
+ __ ShiftLeftImm(r0, r3, Operand(kPointerSizeLog2)); |
+ __ StorePX(r4, MemOperand(sp, r0)); |
+ __ addi(r3, r3, Operand(3)); |
__ Push(r6, r5); |
__ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
} |