| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 187f91259aabdc3ad987a8028a62d9278d2b9aa6..cb7e22018a1f1bfba5a80afe9054b02a1ad3ae2f 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -2480,27 +2480,24 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| __ Branch(&done, eq, a5, Operand(at));
|
| __ ld(feedback_map, FieldMemOperand(a5, 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, a5);
|
| - __ Branch(&megamorphic, ne, a1, Operand(a5));
|
| - __ jmp(&done);
|
| - }
|
| + // Make sure the function is the Array() function
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a5);
|
| + __ Branch(&megamorphic, ne, a1, Operand(a5));
|
| + __ jmp(&done);
|
|
|
| __ bind(&miss);
|
|
|
| @@ -2519,23 +2516,21 @@ 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, a5);
|
| - __ Branch(¬_array_function, ne, a1, Operand(a5));
|
| -
|
| - // 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);
|
| + // Make sure the function is the Array() function.
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a5);
|
| + __ Branch(¬_array_function, ne, a1, Operand(a5));
|
| +
|
| + // 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);
|
| - }
|
| + __ bind(¬_array_function);
|
|
|
| - CreateWeakCellStub create_stub(masm->isolate());
|
| - CallStubInRecordCallTarget(masm, &create_stub, is_super);
|
| + CreateWeakCellStub weak_cell_stub(masm->isolate());
|
| + CallStubInRecordCallTarget(masm, &weak_cell_stub, is_super);
|
| __ bind(&done);
|
| }
|
|
|
| @@ -2655,21 +2650,14 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
|
|
| __ dsrl(at, a3, 32 - kPointerSizeLog2);
|
| __ Daddu(a5, 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.
|
| - __ ld(a2, FieldMemOperand(a5, FixedArray::kHeaderSize + kPointerSize));
|
| - } else {
|
| - Label feedback_register_initialized;
|
| - // Put the AllocationSite from the feedback vector into a2, or undefined.
|
| - __ ld(a2, FieldMemOperand(a5, FixedArray::kHeaderSize));
|
| - __ ld(a5, FieldMemOperand(a2, AllocationSite::kMapOffset));
|
| - __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| - __ Branch(&feedback_register_initialized, eq, a5, 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.
|
| + __ ld(a2, FieldMemOperand(a5, FixedArray::kHeaderSize));
|
| + __ ld(a5, FieldMemOperand(a2, AllocationSite::kMapOffset));
|
| + __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| + __ Branch(&feedback_register_initialized, eq, a5, Operand(at));
|
| + __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
|
| + __ bind(&feedback_register_initialized);
|
|
|
| __ AssertUndefinedOrAllocationSite(a2, a5);
|
| }
|
|
|