| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index 39bef3065b422f9188ed3696ea154f9404468f12..05739adaf0e73431349581d39e27d577d4268736 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -1865,7 +1865,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate)));
|
| __ j(equal, &done, Label::kFar);
|
|
|
| - if (!FLAG_pretenuring_call_new) {
|
| + if (!FLAG_pretenuring_call_new && FLAG_allocation_site_transitioning) {
|
| // 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
|
| @@ -1898,7 +1898,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| // An uninitialized cache is patched with the function or sentinel to
|
| // indicate the ElementsKind if function is the Array constructor.
|
| __ bind(&initialize);
|
| - if (!FLAG_pretenuring_call_new) {
|
| + if (!FLAG_pretenuring_call_new && FLAG_allocation_site_transitioning) {
|
| // Make sure the function is the Array() function
|
| __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx);
|
| __ cmp(edi, ecx);
|
| @@ -2087,7 +2087,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| // entry is at the feedback vector slot given by edx + 1.
|
| __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size,
|
| FixedArray::kHeaderSize + kPointerSize));
|
| - } else {
|
| + } else if (FLAG_allocation_site_transitioning) {
|
| Label feedback_register_initialized;
|
| // Put the AllocationSite from the feedback vector into ebx, or undefined.
|
| __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size,
|
| @@ -2098,6 +2098,8 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| __ j(equal, &feedback_register_initialized);
|
| __ mov(ebx, isolate()->factory()->undefined_value());
|
| __ bind(&feedback_register_initialized);
|
| + } else {
|
| + __ mov(ebx, isolate()->factory()->undefined_value());
|
| }
|
|
|
| __ AssertUndefinedOrAllocationSite(ebx);
|
| @@ -4440,20 +4442,23 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| __ AssertUndefinedOrAllocationSite(ebx);
|
| }
|
|
|
| - Label no_info;
|
| - // If the feedback vector is the undefined value call an array constructor
|
| - // that doesn't use AllocationSites.
|
| - __ cmp(ebx, isolate()->factory()->undefined_value());
|
| - __ j(equal, &no_info);
|
| + if (FLAG_allocation_site_transitioning) {
|
| + Label no_info;
|
| + // If the feedback vector is the undefined value call an array constructor
|
| + // that doesn't use AllocationSites.
|
| + __ cmp(ebx, isolate()->factory()->undefined_value());
|
| + __ j(equal, &no_info);
|
|
|
| - // Only look at the lower 16 bits of the transition info.
|
| - __ mov(edx, FieldOperand(ebx, AllocationSite::kTransitionInfoOffset));
|
| - __ SmiUntag(edx);
|
| - STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
|
| - __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask));
|
| - GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
|
| + // Only look at the lower 16 bits of the transition info.
|
| + __ mov(edx, FieldOperand(ebx, AllocationSite::kTransitionInfoOffset));
|
| + __ SmiUntag(edx);
|
| + STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
|
| + __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask));
|
| + GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
|
| +
|
| + __ bind(&no_info);
|
| + }
|
|
|
| - __ bind(&no_info);
|
| GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
|
| }
|
|
|
|
|