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

Unified Diff: src/ast/scopes.cc

Issue 2353623002: Filter out synthetic variables from with scopes (Closed)
Patch Set: Fix whitespace 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
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 87ffb9dd7a529969e4667b51f0ae0f3bf74d9b35..bfbae7626aeb0ea0036a76be7b1336962181b7a2 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1448,7 +1448,7 @@ Variable* Scope::LookupRecursive(VariableProxy* proxy, Scope* outer_scope_end) {
// "this" can't be shadowed by "eval"-introduced bindings or by "with"
// scopes.
// TODO(wingo): There are other variables in this category; add them.
- if (var->is_this()) return var;
+ if (Scope::VariableIsSynthetic(var->raw_name())) return var;
Toon Verwaest 2016/09/19 20:01:50 I'd be much in favor of having specialized scope r
Dan Ehrenberg 2016/09/20 17:22:13 I looked into some ways to mitigate the performanc
if (is_with_scope()) {
// The current scope is a with scope, so the variable binding can not be

Powered by Google App Engine
This is Rietveld 408576698