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

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: Fix nits 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
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698