| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 7000e1ddc2f4df9ab918e3e2c5e24fcb5e42d21c..c4df5b7f19c53041513df868a1d8aed7777be042 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -1818,28 +1818,26 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| __ j(equal, &done, Label::kFar);
|
| __ CompareRoot(FieldOperand(r11, HeapObject::kMapOffset),
|
| Heap::kWeakCellMapRootIndex);
|
| - __ j(not_equal, FLAG_pretenuring_call_new ? &miss : &check_allocation_site);
|
| + __ j(not_equal, &check_allocation_site);
|
|
|
| // If the weak cell is cleared, we have a new chance to become monomorphic.
|
| __ CheckSmi(FieldOperand(r11, WeakCell::kValueOffset));
|
| __ j(equal, &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.
|
| - __ CompareRoot(FieldOperand(r11, 0), Heap::kAllocationSiteMapRootIndex);
|
| - __ j(not_equal, &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(FieldOperand(r11, 0), Heap::kAllocationSiteMapRootIndex);
|
| + __ j(not_equal, &miss);
|
|
|
| - // Make sure the function is the Array() function
|
| - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r11);
|
| - __ cmpp(rdi, r11);
|
| - __ j(not_equal, &megamorphic);
|
| - __ jmp(&done);
|
| - }
|
| + // Make sure the function is the Array() function
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r11);
|
| + __ cmpp(rdi, r11);
|
| + __ j(not_equal, &megamorphic);
|
| + __ jmp(&done);
|
|
|
| __ bind(&miss);
|
|
|
| @@ -1858,23 +1856,20 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, bool is_super) {
|
| // indicate the ElementsKind if function is the Array constructor.
|
| __ bind(&initialize);
|
|
|
| - if (!FLAG_pretenuring_call_new) {
|
| - // Make sure the function is the Array() function
|
| - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r11);
|
| - __ cmpp(rdi, r11);
|
| - __ j(not_equal, ¬_array_function);
|
| -
|
| - CreateAllocationSiteStub create_stub(isolate);
|
| - CallStubInRecordCallTarget(masm, &create_stub, is_super);
|
| - __ jmp(&done_no_smi_convert);
|
| -
|
| - __ bind(¬_array_function);
|
| - }
|
| + // Make sure the function is the Array() function
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r11);
|
| + __ cmpp(rdi, r11);
|
| + __ j(not_equal, ¬_array_function);
|
|
|
| - CreateWeakCellStub create_stub(isolate);
|
| + CreateAllocationSiteStub create_stub(isolate);
|
| CallStubInRecordCallTarget(masm, &create_stub, is_super);
|
| __ jmp(&done_no_smi_convert);
|
|
|
| + __ bind(¬_array_function);
|
| + CreateWeakCellStub weak_cell_stub(isolate);
|
| + CallStubInRecordCallTarget(masm, &weak_cell_stub, is_super);
|
| + __ jmp(&done_no_smi_convert);
|
| +
|
| __ bind(&done);
|
| __ Integer32ToSmi(rdx, rdx);
|
|
|
| @@ -1998,22 +1993,14 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| GenerateRecordCallTarget(masm, IsSuperConstructorCall());
|
|
|
| __ SmiToInteger32(rdx, rdx);
|
| - if (FLAG_pretenuring_call_new) {
|
| - // Put the AllocationSite from the feedback vector into ebx.
|
| - // By adding kPointerSize we encode that we know the AllocationSite
|
| - // entry is at the feedback vector slot given by rdx + 1.
|
| - __ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size,
|
| - FixedArray::kHeaderSize + kPointerSize));
|
| - } else {
|
| - Label feedback_register_initialized;
|
| - // Put the AllocationSite from the feedback vector into rbx, or undefined.
|
| - __ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size,
|
| - FixedArray::kHeaderSize));
|
| - __ CompareRoot(FieldOperand(rbx, 0), Heap::kAllocationSiteMapRootIndex);
|
| - __ j(equal, &feedback_register_initialized);
|
| - __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
|
| - __ bind(&feedback_register_initialized);
|
| - }
|
| + Label feedback_register_initialized;
|
| + // Put the AllocationSite from the feedback vector into rbx, or undefined.
|
| + __ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size,
|
| + FixedArray::kHeaderSize));
|
| + __ CompareRoot(FieldOperand(rbx, 0), Heap::kAllocationSiteMapRootIndex);
|
| + __ j(equal, &feedback_register_initialized);
|
| + __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
|
| + __ bind(&feedback_register_initialized);
|
|
|
| __ AssertUndefinedOrAllocationSite(rbx);
|
| }
|
|
|