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

Unified Diff: src/ast/scopes.cc

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/ast/scopes.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index d9f34c894238ce934848e3636e7a361e0b602208..03d4613ffd26cb916d5f7f9edf0b0a4002749827 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -271,7 +271,6 @@ void DeclarationScope::SetDefaults() {
function_ = nullptr;
arguments_ = nullptr;
this_function_ = nullptr;
- arity_ = 0;
}
void Scope::SetDefaults() {
@@ -840,9 +839,6 @@ Variable* DeclarationScope::DeclareParameter(
// TODO(wingo): Avoid O(n^2) check.
*is_duplicate = IsDeclaredParameter(name);
}
- if (!is_optional && !is_rest && arity_ == params_.length()) {
- ++arity_;
- }
has_rest_ = is_rest;
params_.Add(var, zone());
if (name == ast_value_factory->arguments_string()) {
« no previous file with comments | « src/ast/scopes.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698