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

Unified Diff: src/ast.cc

Issue 1336123002: Fix spread operator in ArrayLiterals when nested in other literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/harmony/regress/regress-4417.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 1b39e3190aa4021ebc6217b063dc219e9582e9d2..e2d24f9e0c44ae376f85547409bc79d17094b06c 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -556,7 +556,7 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
Strength::WEAK, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
// Fill in the literals.
- bool is_simple = true;
+ bool is_simple = (first_spread_index_ < 0);
int depth_acc = 1;
bool is_holey = false;
int array_index = 0;
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-4417.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698