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

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

Issue 2838123004: [turbofan] Fix lowering of Array constructor with one argument. (Closed)
Patch Set: Created 3 years, 8 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/regress/regress-crbug-715404.js » ('j') | no next file with comments »
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 6a726b9f645b0b33e471a0d9a3392fa7b6f6906d..6d383caac0ba7e209cce1fb4ba6702141ec56cf2 100644
--- a/src/compiler/js-create-lowering.cc
+++ b/src/compiler/js-create-lowering.cc
@@ -815,7 +815,7 @@ Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
} else if (p.arity() == 1) {
Node* length = NodeProperties::GetValueInput(node, 2);
Type* length_type = NodeProperties::GetType(length);
- if (!length_type->Maybe(Type::Unsigned32())) {
+ if (!length_type->Maybe(Type::Number())) {
// Handle the single argument case, where we know that the value
// cannot be a valid Array length.
return ReduceNewArray(node, {length}, site);
Michael Achenbach 2017/04/26 12:36:08 Are you sure this code is covered? Sancov bot show
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-715404.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698