| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index adc2d50d5b1fc0abd9994515afd83e8d62184fd0..a1aa0220200d4309716ba5e6af46577036e180da 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -5785,10 +5785,12 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm,
|
| __ Assert(equal, kExpectedAllocationSiteInCell);
|
| }
|
|
|
| - // Save the resulting elements kind in type info
|
| - __ SmiTag(edx);
|
| - __ mov(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset), edx);
|
| - __ SmiUntag(edx);
|
| + // Save the resulting elements kind in type info. We can't just store r3
|
| + // in the AllocationSite::transition_info field because elements kind is
|
| + // restricted to a portion of the field...upper bits need to be left alone.
|
| + STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
|
| + __ add(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset),
|
| + Immediate(Smi::FromInt(kFastElementsKindPackedToHoley)));
|
|
|
| __ bind(&normal_sequence);
|
| int last_index = GetSequenceIndexFromFastElementsKind(
|
| @@ -5929,8 +5931,11 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| masm->isolate()->factory()->allocation_site_map()));
|
| __ j(not_equal, &no_info);
|
|
|
| + // Only look at the lower 16 bits of the transition info.
|
| __ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset));
|
| __ SmiUntag(edx);
|
| + STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
|
| + __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask));
|
| GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
|
|
|
| __ bind(&no_info);
|
|
|