| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 76a577c79cefcb107b23848dadcc661da4ef270a..3fd4842482d7288539e855b10d5f9ce771f3f813 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -2446,27 +2446,24 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| __ Branch(&done, eq, t2, Operand(at));
|
| __ lw(feedback_map, FieldMemOperand(t2, HeapObject::kMapOffset));
|
| __ LoadRoot(at, Heap::kWeakCellMapRootIndex);
|
| - __ Branch(FLAG_pretenuring_call_new ? &miss : &check_allocation_site, ne,
|
| - feedback_map, Operand(at));
|
| + __ Branch(&check_allocation_site, ne, feedback_map, Operand(at));
|
|
|
| // If the weak cell is cleared, we have a new chance to become monomorphic.
|
| __ JumpIfSmi(weak_value, &initialize);
|
| __ jmp(&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.
|
| - __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| - __ Branch(&miss, ne, feedback_map, Operand(at));
|
| + __ 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.
|
| + __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| + __ Branch(&miss, ne, feedback_map, Operand(at));
|
|
|
| - // Make sure the function is the Array() function
|
| - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t2);
|
| - __ Branch(&megamorphic, ne, a1, Operand(t2));
|
| - __ jmp(&done);
|
| - }
|
| + // Make sure the function is the Array() function
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t2);
|
| + __ Branch(&megamorphic, ne, a1, Operand(t2));
|
| + __ jmp(&done);
|
|
|
| __ bind(&miss);
|
|
|
| @@ -2485,23 +2482,20 @@ 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, t2);
|
| - __ Branch(¬_array_function, ne, a1, Operand(t2));
|
| -
|
| - // 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);
|
| - __ Branch(&done);
|
| -
|
| - __ bind(¬_array_function);
|
| - }
|
| -
|
| - CreateWeakCellStub create_stub(masm->isolate());
|
| + // Make sure the function is the Array() function.
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t2);
|
| + __ Branch(¬_array_function, ne, a1, Operand(t2));
|
| +
|
| + // 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);
|
| + __ Branch(&done);
|
| +
|
| + __ bind(¬_array_function);
|
| + CreateWeakCellStub weak_cell_stub(masm->isolate());
|
| + CallStubInRecordCallTarget(masm, &weak_cell_stub, is_super);
|
| __ bind(&done);
|
| }
|
|
|
| @@ -2619,21 +2613,14 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
|
|
| __ sll(at, a3, kPointerSizeLog2 - kSmiTagSize);
|
| __ Addu(t1, a2, at);
|
| - if (FLAG_pretenuring_call_new) {
|
| - // Put the AllocationSite from the feedback vector into a2.
|
| - // By adding kPointerSize we encode that we know the AllocationSite
|
| - // entry is at the feedback vector slot given by a3 + 1.
|
| - __ lw(a2, FieldMemOperand(t1, FixedArray::kHeaderSize + kPointerSize));
|
| - } else {
|
| - Label feedback_register_initialized;
|
| - // Put the AllocationSite from the feedback vector into a2, or undefined.
|
| - __ lw(a2, FieldMemOperand(t1, FixedArray::kHeaderSize));
|
| - __ lw(t1, FieldMemOperand(a2, AllocationSite::kMapOffset));
|
| - __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| - __ Branch(&feedback_register_initialized, eq, t1, Operand(at));
|
| - __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
|
| - __ bind(&feedback_register_initialized);
|
| - }
|
| + Label feedback_register_initialized;
|
| + // Put the AllocationSite from the feedback vector into a2, or undefined.
|
| + __ lw(a2, FieldMemOperand(t1, FixedArray::kHeaderSize));
|
| + __ lw(t1, FieldMemOperand(a2, AllocationSite::kMapOffset));
|
| + __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| + __ Branch(&feedback_register_initialized, eq, t1, Operand(at));
|
| + __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
|
| + __ bind(&feedback_register_initialized);
|
|
|
| __ AssertUndefinedOrAllocationSite(a2, t1);
|
| }
|
|
|