Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: src/compiler/js-create-lowering.cc

Issue 2126623003: [turbofan] Set elements kind to holey if constructing array of possibly non-zero length. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-621147.js » ('j') | test/mjsunit/compiler/regress-621147.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-621147.js » ('j') | test/mjsunit/compiler/regress-621147.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698