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

Unified Diff: src/parsing/parser-base.h

Issue 2322243002: Preparse inner functions. (Closed)
Patch Set: fixes 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.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index fad093081187054b9b15764ef4b48cf8907e7581..7c666db2a3d3208fa78279d50c755258f2332194 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -3865,14 +3865,17 @@ ParserBase<Impl>::ParseArrowFunctionLiteral(
// Multiple statement body
Consume(Token::LBRACE);
DCHECK_EQ(scope(), formal_parameters.scope);
- bool is_lazily_parsed = (mode() == PARSE_LAZILY &&
- formal_parameters.scope->AllowsLazyParsing());
+ bool is_lazily_parsed =
+ (mode() == PARSE_LAZILY &&
+ formal_parameters.scope
+ ->AllowsLazyParsingWithoutUnresolvedVariables());
+ // TODO(marja): consider lazy-parsing inner arrow functions too.
if (is_lazily_parsed) {
Scanner::BookmarkScope bookmark(scanner());
bool may_abort = bookmark.Set();
LazyParsingResult result = impl()->SkipLazyFunctionBody(
- &materialized_literal_count, &expected_property_count, may_abort,
- CHECK_OK);
+ &materialized_literal_count, &expected_property_count, false,
+ may_abort, CHECK_OK);
if (formal_parameters.materialized_literals_count > 0) {
materialized_literal_count +=
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698