| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 9727ea01ec625886aa6a5833d602a65bc9dedbfb..266afce20435ef68d8a424ed00b019e4076a6934 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1649,8 +1649,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| ASSERT_EQ(2, constant_elements->length());
|
| ElementsKind constant_elements_kind =
|
| static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value());
|
| - bool has_constant_fast_elements =
|
| - IsFastObjectElementsKind(constant_elements_kind);
|
| + bool has_constant_fast_elements = constant_elements_kind == FAST_ELEMENTS;
|
| Handle<FixedArrayBase> constant_elements_values(
|
| FixedArrayBase::cast(constant_elements->get(1)));
|
|
|
| @@ -1661,7 +1660,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| Heap* heap = isolate()->heap();
|
| if (has_constant_fast_elements &&
|
| constant_elements_values->map() == heap->fixed_cow_array_map()) {
|
| - // If the elements are already FAST_*_ELEMENTS, the boilerplate cannot
|
| + // If the elements are already FAST_ELEMENTS, the boilerplate cannot
|
| // change, so it's possible to specialize the stub in advance.
|
| __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), 1);
|
| FastCloneShallowArrayStub stub(
|
| @@ -1673,9 +1672,10 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) {
|
| __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3);
|
| } else {
|
| - ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) ||
|
| + ASSERT(constant_elements_kind == FAST_ELEMENTS ||
|
| + constant_elements_kind == FAST_SMI_ONLY_ELEMENTS ||
|
| FLAG_smi_only_arrays);
|
| - // If the elements are already FAST_*_ELEMENTS, the boilerplate cannot
|
| + // If the elements are already FAST_ELEMENTS, the boilerplate cannot
|
| // change, so it's possible to specialize the stub in advance.
|
| FastCloneShallowArrayStub::Mode mode = has_constant_fast_elements
|
| ? FastCloneShallowArrayStub::CLONE_ELEMENTS
|
| @@ -1703,9 +1703,9 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| }
|
| VisitForAccumulatorValue(subexpr);
|
|
|
| - if (IsFastObjectElementsKind(constant_elements_kind)) {
|
| - // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they
|
| - // cannot transition and don't need to call the runtime stub.
|
| + if (constant_elements_kind == FAST_ELEMENTS) {
|
| + // Fast-case array literal with ElementsKind of FAST_ELEMENTS, they cannot
|
| + // transition and don't need to call the runtime stub.
|
| int offset = FixedArray::kHeaderSize + (i * kPointerSize);
|
| __ mov(ebx, Operand(esp, 0)); // Copy of array literal.
|
| __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset));
|
|
|