Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 2443063e2a7a00869287fcfa044faa929660eaa4..fcf52a97203f12259f6003886c30d191414d8e13 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -1089,12 +1089,14 @@ void DeclarationScope::AllocateVariables(ParseInfo* info, AnalyzeMode mode) { |
AllocateScopeInfosRecursively(info->isolate(), mode, outer_scope); |
} |
-bool Scope::AllowsLazyParsing() const { |
- // If we are inside a block scope, we must parse eagerly to find out how |
- // to allocate variables on the block scope. At this point, declarations may |
- // not have yet been parsed. |
+bool Scope::AllowsLazyParsingWithoutUnresolvedVariables() const { |
+ // If we are inside a block scope, we must find unresolved variables in the |
+ // 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()) return false; |
+ // TODO(marja): Refactor parsing modes: also add s->is_function_scope() |
+ // here. |
} |
return true; |
} |