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

Unified Diff: src/parsing/preparser.cc

Issue 2169823002: FunctionState doesn't need to know AstNodeFactory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 5 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/parsing/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index cb19c525fe3fbfceb27e7bfb6665677a47d3aa1d..ba82806f3d8bebbaa44247de00712fa3b6d482d9 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -132,15 +132,13 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
// Lazy functions always have trivial outer scopes (no with/catch scopes).
DCHECK_NULL(scope_state_);
Scope* top_scope = NewScriptScope();
- PreParserFactory top_factory(nullptr);
FunctionState top_state(&function_state_, &scope_state_, top_scope,
- kNormalFunction, &top_factory);
+ kNormalFunction);
scope()->SetLanguageMode(language_mode);
Scope* function_scope = NewFunctionScope(kind);
if (!has_simple_parameters) function_scope->SetHasNonSimpleParameters();
- PreParserFactory function_factory(nullptr);
FunctionState function_state(&function_state_, &scope_state_, function_scope,
- kind, &function_factory);
+ kind);
DCHECK_EQ(Token::LBRACE, scanner()->current_token());
bool ok = true;
int start_position = peek_position();
@@ -1113,9 +1111,8 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
bool outer_is_script_scope = scope()->is_script_scope();
Scope* function_scope = NewFunctionScope(kind);
function_scope->SetLanguageMode(language_mode);
- PreParserFactory factory(NULL);
FunctionState function_state(&function_state_, &scope_state_, function_scope,
- kind, &factory);
+ kind);
DuplicateFinder duplicate_finder(scanner()->unicode_cache());
ExpressionClassifier formals_classifier(this, &duplicate_finder);
« no previous file with comments | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698