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

Unified Diff: src/ast/scopes.cc

Issue 2654423004: [async-functions] support await expressions in finally statements (Closed)
Patch Set: I'd like to build with -Wunused-variables locally, but how!? Created 3 years, 11 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/bailout-reason.h » ('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 ad1c137753e475963467df4a934f414f9d649161..2a3cece7d9df16cbd8b103c2dba5c87f18bb8504 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1349,6 +1349,18 @@ Scope* Scope::GetOuterScopeWithContext() {
return scope;
}
+bool Scope::HasLazilyParsedInnerFunctionScope() const {
+ for (Scope* scope = inner_scope_; scope; scope = scope->sibling_) {
+ if (scope->is_function_scope()) {
+ if (static_cast<DeclarationScope*>(scope)->was_lazily_parsed()) {
+ return true;
+ }
+ }
+ if (scope->HasLazilyParsedInnerFunctionScope()) return true;
+ }
+ return false;
+}
+
Handle<StringSet> DeclarationScope::CollectNonLocals(
ParseInfo* info, Handle<StringSet> non_locals) {
VariableProxy* free_variables = FetchFreeVariables(this, info);
« no previous file with comments | « src/ast/scopes.h ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698