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

Unified Diff: src/ast.cc

Issue 1307223002: [es6] fix nested object literals with computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename accessor to something that makes more sense Created 5 years, 4 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
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 624d462323a9574c278af3e01a240976509239ac..92be8e1952f82d2d251a81b65eff675cd6cb3df1 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -433,7 +433,8 @@ void ObjectLiteral::BuildConstantProperties(Isolate* isolate) {
int position = 0;
// Accumulate the value in local variables and store it at the end.
- bool is_simple = true;
+ // If computed property names are used, the literal is never simple.
+ bool is_simple = !has_computed_property_names();
int depth_acc = 1;
uint32_t max_element_index = 0;
uint32_t elements = 0;
« src/ast.h ('K') | « src/ast.h ('k') | test/mjsunit/es6/computed-property-names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698