| Index: src/ppc/code-stubs-ppc.cc
|
| diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
|
| index 573893dab734b78fa8f00af32ff2e90c1457b9aa..5aad74a10b5c0948280b901d72da6edb39986f84 100644
|
| --- a/src/ppc/code-stubs-ppc.cc
|
| +++ b/src/ppc/code-stubs-ppc.cc
|
| @@ -2480,27 +2480,25 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| __ beq(&done);
|
| __ LoadP(feedback_map, FieldMemOperand(r8, HeapObject::kMapOffset));
|
| __ CompareRoot(feedback_map, Heap::kWeakCellMapRootIndex);
|
| - __ bne(FLAG_pretenuring_call_new ? &miss : &check_allocation_site);
|
| + __ bne(&check_allocation_site);
|
|
|
| // If the weak cell is cleared, we have a new chance to become monomorphic.
|
| __ JumpIfSmi(weak_value, &initialize);
|
| __ b(&megamorphic);
|
|
|
| - if (!FLAG_pretenuring_call_new) {
|
| - __ bind(&check_allocation_site);
|
| - // If we came here, we need to see if we are the array function.
|
| - // If we didn't have a matching function, and we didn't find the megamorph
|
| - // sentinel, then we have in the slot either some other function or an
|
| - // AllocationSite.
|
| - __ CompareRoot(feedback_map, Heap::kAllocationSiteMapRootIndex);
|
| - __ bne(&miss);
|
| + __ bind(&check_allocation_site);
|
| + // If we came here, we need to see if we are the array function.
|
| + // If we didn't have a matching function, and we didn't find the megamorph
|
| + // sentinel, then we have in the slot either some other function or an
|
| + // AllocationSite.
|
| + __ CompareRoot(feedback_map, Heap::kAllocationSiteMapRootIndex);
|
| + __ bne(&miss);
|
|
|
| - // Make sure the function is the Array() function
|
| - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r8);
|
| - __ cmp(r4, r8);
|
| - __ bne(&megamorphic);
|
| - __ b(&done);
|
| - }
|
| + // Make sure the function is the Array() function
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r8);
|
| + __ cmp(r4, r8);
|
| + __ bne(&megamorphic);
|
| + __ b(&done);
|
|
|
| __ bind(&miss);
|
|
|
| @@ -2520,24 +2518,22 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| // An uninitialized cache is patched with the function
|
| __ bind(&initialize);
|
|
|
| - if (!FLAG_pretenuring_call_new) {
|
| - // Make sure the function is the Array() function.
|
| - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r8);
|
| - __ cmp(r4, r8);
|
| - __ bne(¬_array_function);
|
| -
|
| - // The target function is the Array constructor,
|
| - // Create an AllocationSite if we don't already have it, store it in the
|
| - // slot.
|
| - CreateAllocationSiteStub create_stub(masm->isolate());
|
| - CallStubInRecordCallTarget(masm, &create_stub, is_super);
|
| - __ b(&done);
|
| -
|
| - __ bind(¬_array_function);
|
| - }
|
| + // Make sure the function is the Array() function.
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r8);
|
| + __ cmp(r4, r8);
|
| + __ bne(¬_array_function);
|
|
|
| - CreateWeakCellStub create_stub(masm->isolate());
|
| + // The target function is the Array constructor,
|
| + // Create an AllocationSite if we don't already have it, store it in the
|
| + // slot.
|
| + CreateAllocationSiteStub create_stub(masm->isolate());
|
| CallStubInRecordCallTarget(masm, &create_stub, is_super);
|
| + __ b(&done);
|
| +
|
| + __ bind(¬_array_function);
|
| +
|
| + CreateWeakCellStub weak_cell_stub(masm->isolate());
|
| + CallStubInRecordCallTarget(masm, &weak_cell_stub, is_super);
|
| __ bind(&done);
|
| }
|
|
|
| @@ -2665,25 +2661,18 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
|
|
| __ SmiToPtrArrayOffset(r8, r6);
|
| __ add(r8, r5, r8);
|
| - if (FLAG_pretenuring_call_new) {
|
| - // Put the AllocationSite from the feedback vector into r5.
|
| - // By adding kPointerSize we encode that we know the AllocationSite
|
| - // entry is at the feedback vector slot given by r6 + 1.
|
| - __ LoadP(r5, FieldMemOperand(r8, FixedArray::kHeaderSize + kPointerSize));
|
| + // Put the AllocationSite from the feedback vector into r5, or undefined.
|
| + __ LoadP(r5, FieldMemOperand(r8, FixedArray::kHeaderSize));
|
| + __ LoadP(r8, FieldMemOperand(r5, AllocationSite::kMapOffset));
|
| + __ CompareRoot(r8, Heap::kAllocationSiteMapRootIndex);
|
| + if (CpuFeatures::IsSupported(ISELECT)) {
|
| + __ LoadRoot(r8, Heap::kUndefinedValueRootIndex);
|
| + __ isel(eq, r5, r5, r8);
|
| } else {
|
| - // Put the AllocationSite from the feedback vector into r5, or undefined.
|
| - __ LoadP(r5, FieldMemOperand(r8, FixedArray::kHeaderSize));
|
| - __ LoadP(r8, FieldMemOperand(r5, AllocationSite::kMapOffset));
|
| - __ CompareRoot(r8, Heap::kAllocationSiteMapRootIndex);
|
| - if (CpuFeatures::IsSupported(ISELECT)) {
|
| - __ LoadRoot(r8, Heap::kUndefinedValueRootIndex);
|
| - __ isel(eq, r5, r5, r8);
|
| - } else {
|
| - Label feedback_register_initialized;
|
| - __ beq(&feedback_register_initialized);
|
| - __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
|
| - __ bind(&feedback_register_initialized);
|
| - }
|
| + Label feedback_register_initialized;
|
| + __ beq(&feedback_register_initialized);
|
| + __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
|
| + __ bind(&feedback_register_initialized);
|
| }
|
|
|
| __ AssertUndefinedOrAllocationSite(r5, r8);
|
|
|