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

Unified Diff: src/ast/scopes.h

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 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 | « src/ast/prettyprinter.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 96fcc5141be46124a8478b2e56723f516e9fd1ca..2215622b2c17803791c2eb3c37363a96220c9828 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -676,7 +676,14 @@ class DeclarationScope : public Scope {
}
// Returns the default function arity excluding default or rest parameters.
- int default_function_length() const { return arity_; }
+ // This will be used to set the length of the function, by default.
+ // Class field initializers use this property to indicate the number of
+ // fields being initialized.
+ int arity() const { return arity_; }
+
+ // Normal code should not need to call this. Class field initializers use this
+ // property to indicate the number of fields being initialized.
+ void set_arity(int arity) { arity_ = arity; }
// Returns the number of formal parameters, excluding a possible rest
// parameter. Examples:
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698