Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index baa813ae0ef9417a87ef28268e57498e73daabdf..c51f9bc038a61e75ef10329e18d6cf132519a090 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -1821,7 +1821,17 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ Push(a3, a2, a1, a0); |
__ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
} else { |
- FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
+ 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(isolate(), mode, allocation_site_mode, |
+ length); |
__ CallStub(&stub); |
} |