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

Unified Diff: src/ast/scopes.cc

Issue 2399853002: [parser] Lazy compilation no longer needs context chain. (Closed)
Patch Set: 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 | « src/ast/scopes.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
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 22402b9c692d35000fd667c1f3d347c560b3d94a..61fafb1ba18dad6dd7286bd22e899179ff067832 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1110,17 +1110,6 @@ bool DeclarationScope::AllowsLazyCompilation() const {
return !force_eager_compilation_;
}
-bool DeclarationScope::AllowsLazyCompilationWithoutContext() const {
- if (force_eager_compilation_) return false;
- // Disallow lazy compilation without context if any outer scope needs a
- // context.
- for (const Scope* scope = outer_scope_; scope != nullptr;
- scope = scope->outer_scope_) {
- if (scope->NeedsContext()) return false;
- }
- return true;
-}
-
int Scope::ContextChainLength(Scope* scope) const {
int n = 0;
for (const Scope* s = this; s != scope; s = s->outer_scope_) {
« no previous file with comments | « src/ast/scopes.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698