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

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: 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
« no previous file with comments | « no previous file | test/mjsunit/es6/computed-property-names.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 624d462323a9574c278af3e01a240976509239ac..eea011034cfcb7761f5a5a3506cf05afcc547315 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 properties are used, the literal is never simple.
+ bool is_simple = boilerplate_properties_ != 0 || properties()->length() == 0;
wingo 2015/08/24 16:04:40 I am missing a bit of context. Is boilerplate_pro
caitp (gmail) 2015/08/24 16:08:27 yeah, it can be organized that way for sure. I'm n
int depth_acc = 1;
uint32_t max_element_index = 0;
uint32_t elements = 0;
« no previous file with comments | « no previous file | test/mjsunit/es6/computed-property-names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698