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

Unified Diff: src/parsing/preparser.h

Issue 2479213002: [parser] Only track parsing-mode (and possibly switch to the preparser) in the parser (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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/parser-base.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.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 4eb915cfd60c799698e04036eb7d639aa82d56a9..ac41f1a8724aeb62e444a99ce28ec80b43875244 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -911,7 +911,10 @@ class PreParser : public ParserBase<PreParser> {
const PreParserFormalParameters& parameters, FunctionKind kind,
FunctionLiteral::FunctionType function_type, bool* ok);
+ // Indicates that we won't switch from the preparser to the preparser; we'll
+ // just stay where we are.
bool AllowsLazyParsingWithoutUnresolvedVariables() const { return false; }
+ bool parse_lazily() const { return false; }
V8_INLINE LazyParsingResult SkipFunction(
FunctionKind kind, DeclarationScope* function_scope, int* num_parameters,
@@ -1523,7 +1526,6 @@ PreParserStatementList PreParser::ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
const PreParserFormalParameters& parameters, FunctionKind kind,
FunctionLiteral::FunctionType function_type, bool* ok) {
- ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
PreParserStatementList result;
Scope* inner_scope = scope();
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698