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

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: 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
« src/parsing/parser-base.h ('K') | « 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..69f830e7cd2914d32bd28d009bf0f77065881480 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -911,8 +911,14 @@ 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; }
+ // Indicates that we won't switch from the preparser to the preparser; we'll
vogelheim 2016/11/07 14:56:17 Since this just duplicates the comments (because b
+ // just stay where we are.
+ Mode mode() { return PARSE_EAGERLY; }
+
V8_INLINE LazyParsingResult SkipFunction(
FunctionKind kind, DeclarationScope* function_scope, int* num_parameters,
int* function_length, bool* has_duplicate_parameters,
@@ -1523,7 +1529,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();
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698