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

Unified Diff: src/ast/scopes.cc

Issue 2408303003: Don't count nested function scopes towards MaxNestedContextChainlength (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 | « no previous file | no next file » | 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 22661ec2b0bd91e90efc2fc27a1083417dcba83f..d9f34c894238ce934848e3636e7a361e0b602208 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1153,6 +1153,7 @@ int Scope::ContextChainLengthUntilOutermostSloppyEval() const {
int Scope::MaxNestedContextChainLength() {
int max_context_chain_length = 0;
for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
+ if (scope->is_function_scope()) continue;
max_context_chain_length = std::max(scope->MaxNestedContextChainLength(),
max_context_chain_length);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698