Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 6086645db3c2c08dc3706474d2e224792544a012..6e85bd19ea019d1638a10aceab3132cb3a49c7d2 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1727,7 +1727,6 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
__ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
__ mov(r1, Operand(constant_elements)); |
- __ Push(r3, r2, r1); |
if (has_fast_elements && constant_elements_values->map() == |
isolate()->heap()->fixed_cow_array_map()) { |
FastCloneShallowArrayStub stub( |
@@ -1738,8 +1737,11 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ IncrementCounter( |
isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); |
} else if (expr->depth() > 1) { |
+ __ Push(r3, r2, r1); |
__ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
- } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
+ } else if (Serializer::enabled() || |
+ length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
+ __ Push(r3, r2, r1); |
__ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); |
} else { |
ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |