| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index fbd9a218e056ede549221471e567e5929c96a2dd..4caa6f74b490a453ac7e85ab226d1c81d674a3f3 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1758,23 +1758,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
|
| }
|
|
|
| - 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
|
| - // change, so it's possible to specialize the stub in advance.
|
| - __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), 1);
|
| - __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| - __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset));
|
| - __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
|
| - __ mov(ecx, Immediate(constant_elements));
|
| - FastCloneShallowArrayStub stub(
|
| - FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS,
|
| - allocation_site_mode,
|
| - length);
|
| - __ CallStub(&stub);
|
| - } else if (expr->depth() > 1 || Serializer::enabled() ||
|
| - length > FastCloneShallowArrayStub::kMaximumClonedLength) {
|
| + if (expr->depth() > 1) {
|
| __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset));
|
| __ push(Immediate(Smi::FromInt(expr->literal_index())));
|
| @@ -1782,22 +1766,11 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| __ push(Immediate(Smi::FromInt(flags)));
|
| __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4);
|
| } else {
|
| - ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) ||
|
| - FLAG_smi_only_arrays);
|
| - FastCloneShallowArrayStub::Mode mode =
|
| - FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS;
|
| -
|
| - // If the elements are already FAST_*_ELEMENTS, the boilerplate cannot
|
| - // change, so it's possible to specialize the stub in advance.
|
| - if (has_constant_fast_elements) {
|
| - mode = FastCloneShallowArrayStub::CLONE_ELEMENTS;
|
| - }
|
| -
|
| __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset));
|
| __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
|
| __ mov(ecx, Immediate(constant_elements));
|
| - FastCloneShallowArrayStub stub(mode, allocation_site_mode, length);
|
| + FastCloneShallowArrayStub stub(allocation_site_mode);
|
| __ CallStub(&stub);
|
| }
|
|
|
|
|