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

Unified Diff: src/scopeinfo.cc

Issue 422923004: Track usage of "this" and "arguments" in Scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not propagate inner_uses_$foo out of normal functions, more tests Created 6 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
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 75bf014358cd44731f558225919e513846730900..598c5e669bcfc3073182ba46fa1de0062cbae8f5 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -170,11 +170,11 @@ int ScopeInfo::ContextLength() {
int context_locals = ContextLocalCount();
bool function_name_context_slot =
FunctionVariableField::decode(Flags()) == CONTEXT;
- bool has_context = context_locals > 0 ||
- function_name_context_slot ||
- scope_type() == WITH_SCOPE ||
- (scope_type() == FUNCTION_SCOPE && CallsEval()) ||
- scope_type() == MODULE_SCOPE;
+ bool has_context = context_locals > 0 || function_name_context_slot ||
+ scope_type() == WITH_SCOPE ||
+ (scope_type() == ARROW_SCOPE && CallsEval()) ||
+ (scope_type() == FUNCTION_SCOPE && CallsEval()) ||
+ scope_type() == MODULE_SCOPE;
if (has_context) {
return Context::MIN_CONTEXT_SLOTS + context_locals +
(function_name_context_slot ? 1 : 0);

Powered by Google App Engine
This is Rietveld 408576698