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

Unified Diff: src/ast/scopes.h

Issue 2351823005: Only create ScopeInfos for scopes that really need one (Closed)
Patch Set: updates Created 4 years, 3 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/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 44797525ca5153c7f96c9387ff22e33deba30717..581d34ead815923d90ada8fb69c2486252182515 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -444,8 +444,10 @@ class Scope: public ZoneObject {
// A lazily parsed scope doesn't contain enough information to create a
// ScopeInfo from it.
if (is_lazily_parsed_) return false;
- return NeedsContext() || is_script_scope() || is_function_scope() ||
- is_eval_scope() || is_module_scope();
+ // The debugger expects all functions to have scope infos.
+ // TODO(jochen|yangguo): Remove this requirement.
+ if (is_function_scope()) return true;
+ return NeedsContext();
}
Zone* zone_;
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698