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

Unified Diff: src/parsing/parser.cc

Issue 2345243002: Only create ScopeInfos for eagerly parsed scopes. (Closed)
Patch Set: updates Created 4 years, 3 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 2379d5f311d607ca0d70a2ee2e736f95982ab8d1..2e5696c7b7e15eb55d5e241c2079a129bed77dae 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3263,6 +3263,7 @@ Parser::LazyParsingResult Parser::SkipLazyFunctionBody(
int function_block_pos = position();
DeclarationScope* scope = this->scope()->AsDeclarationScope();
DCHECK(scope->is_function_scope());
+ scope->set_is_lazily_parsed(true);
if (consume_cached_parse_data() && !cached_parse_data_->rejected()) {
// If we have cached data, we use it to skip parsing the function body. The
// data contains the information we need to construct the lazy function.
@@ -3293,6 +3294,7 @@ Parser::LazyParsingResult Parser::SkipLazyFunctionBody(
ParseLazyFunctionBodyWithPreParser(&logger, may_abort);
// Return immediately if pre-parser decided to abort parsing.
if (result == PreParser::kPreParseAbort) {
+ scope->set_is_lazily_parsed(false);
return kLazyParsingAborted;
}
if (result == PreParser::kPreParseStackOverflow) {
« no previous file with comments | « src/ast/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698