Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1a7df943d7fe00204e66529e748270e2fe6471cb..0075d2c46318ae90608f8399803a2d79a4802875 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1797,24 +1797,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); |
- __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
- __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
- __ Move(rbx, Smi::FromInt(expr->literal_index())); |
- __ Move(rcx, constant_elements); |
- FastCloneShallowArrayStub stub( |
- isolate(), |
- 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) { |
__ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
__ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
__ Push(Smi::FromInt(expr->literal_index())); |
@@ -1822,24 +1805,11 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ Push(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; |
- } |
- |
__ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
__ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
__ Move(rbx, Smi::FromInt(expr->literal_index())); |
__ Move(rcx, constant_elements); |
- FastCloneShallowArrayStub stub(isolate(), |
- mode, |
- allocation_site_mode, length); |
+ FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
__ CallStub(&stub); |
} |