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

Unified Diff: src/ast/scopes.cc

Issue 2413213002: Allow lazy parsing of eval-created functions (Closed)
Patch Set: disallow preparsing without scope resolution of strict-mode evaled functions Created 4 years, 2 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 | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index d9f34c894238ce934848e3636e7a361e0b602208..5626ac5862efdcd24854eb294eccd6ab99099734 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1119,7 +1119,9 @@ bool Scope::AllowsLazyParsingWithoutUnresolvedVariables() const {
// inner scopes to find out how to allocate variables on the block scope. At
// this point, declarations may not have yet been parsed.
for (const Scope* s = this; s != nullptr; s = s->outer_scope_) {
- if (s->is_block_scope() || s->is_function_scope()) return false;
+ if (s->is_block_scope()) return false;
+ if (s->is_function_scope()) return false;
+ if (s->is_eval_scope() && is_strict(s->language_mode())) return false;
}
return true;
}
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698