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

Unified Diff: src/parsing/parser.h

Issue 2414003002: Move function length tracking from Scope to (Pre)?ParserFormalParameters. (Closed)
Patch Set: oops cont Created 4 years, 2 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/objects.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 9cda51672bd767a72d2a8ed31c2367a4488cb550..cae6ec03f476ea9e5f8948eb969bbebaa4deebbf 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -134,7 +134,6 @@ struct ParserFormalParameters : FormalParametersBase {
: FormalParametersBase(scope), params(4, scope->zone()) {}
ZoneList<Parameter> params;
- int Arity() const { return params.length(); }
const Parameter& at(int i) const { return params[i]; }
};
@@ -994,6 +993,7 @@ class Parser : public ParserBase<Parser> {
Expression* initializer,
int initializer_end_position,
bool is_rest) {
+ parameters->UpdateArityAndFunctionLength(initializer != nullptr, is_rest);
bool is_simple = pattern->IsVariableProxy() && initializer == nullptr;
const AstRawString* name = is_simple
? pattern->AsVariableProxy()->raw_name()
« no previous file with comments | « src/objects.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698