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

Unified Diff: src/ast.h

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
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 1366041387215bc4c018c4b1650d39ff5f6549c4..9b7d95e23dd46e1c07a0cd7c57e6125f61cfe9d9 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1489,6 +1489,10 @@ class ObjectLiteral final : public MaterializedLiteral {
// ObjectLiteral can vary, so num_ids() is not a static method.
int num_ids() const { return parent_num_ids() + 1 + properties()->length(); }
+ bool has_computed_property_names() const {
+ return boilerplate_properties_ == 0 && properties_->length() > 0;
adamk 2015/08/24 18:00:53 I don't think the LHS of this expression is correc
adamk 2015/08/24 18:14:29 Hmm, local testing suggests I'm wrong about this f
adamk 2015/08/24 18:16:37 Sorry for the noise, I've confirmed that this is e
+ }
+
// Object literals need one feedback slot for each non-trivial value, as well
// as some slots for home objects.
FeedbackVectorRequirements ComputeFeedbackRequirements(
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698