Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index 76bb1b54e7a859137f2489d0838e43f737d851ab..96b93d22ab9eaeb58daf814a64587c95224072dd 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -1817,31 +1817,12 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset)); |
__ Mov(x2, Smi::FromInt(expr->literal_index())); |
__ Mov(x1, Operand(constant_elements)); |
- if (has_fast_elements && constant_elements_values->map() == |
- isolate()->heap()->fixed_cow_array_map()) { |
- FastCloneShallowArrayStub stub( |
- FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
- allocation_site_mode, |
- length); |
- __ CallStub(&stub); |
- __ IncrementCounter( |
- isolate()->counters()->cow_arrays_created_stub(), 1, x10, x11); |
- } else if ((expr->depth() > 1) || Serializer::enabled() || |
- length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
+ if (expr->depth() > 1) { |
__ Mov(x0, Smi::FromInt(flags)); |
__ Push(x3, x2, x1, x0); |
__ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
} else { |
- ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
- FLAG_smi_only_arrays); |
- FastCloneShallowArrayStub::Mode mode = |
- FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |
- |
- if (has_fast_elements) { |
- mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; |
- } |
- |
- FastCloneShallowArrayStub stub(mode, allocation_site_mode, length); |
+ FastCloneShallowArrayStub stub(allocation_site_mode); |
__ CallStub(&stub); |
} |