Index: src/compiler/js-create-lowering.cc |
diff --git a/src/compiler/js-create-lowering.cc b/src/compiler/js-create-lowering.cc |
index fc77138fc19f2131ba5cb8eadc7672a9cb3a5c2a..0f829d48aefad7d38583813afe60eb108ce7396b 100644 |
--- a/src/compiler/js-create-lowering.cc |
+++ b/src/compiler/js-create-lowering.cc |
@@ -473,6 +473,9 @@ Reduction JSCreateLowering::ReduceNewArray(Node* node, Node* length, |
PretenureFlag pretenure = site->GetPretenureMode(); |
ElementsKind elements_kind = site->GetElementsKind(); |
DCHECK(IsFastElementsKind(elements_kind)); |
+ if (NodeProperties::GetType(length)->Max() > 0) { |
Jarin
2016/07/06 04:39:59
Not sure whether we should thread through the type
|
+ elements_kind = GetHoleyElementsKind(elements_kind); |
+ } |
dependencies()->AssumeTenuringDecision(site); |
dependencies()->AssumeTransitionStable(site); |