Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 02ba67b90e3511f8943b927f1c7ad571ef44df08..4a99287d3eed533e2586350eb4a980e7a18d2ce0 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1751,19 +1751,14 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
DONT_TRACK_ALLOCATION_SITE, |
length); |
__ CallStub(&stub); |
- } else if (expr->depth() > 1) { |
+ } else if (expr->depth() > 1 || |
+ Serializer::enabled() || |
+ length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
__ movq(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
__ push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
__ Push(Smi::FromInt(expr->literal_index())); |
__ Push(constant_elements); |
__ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
- } else if (Serializer::enabled() || |
- length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
- __ movq(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
- __ push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
- __ Push(Smi::FromInt(expr->literal_index())); |
- __ Push(constant_elements); |
- __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); |
} else { |
ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
FLAG_smi_only_arrays); |