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

Unified Diff: src/scopeinfo.cc

Issue 1093183003: Function scopes only must have a context if they call sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix ScopeInfo context slot calculation Created 5 years, 8 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/scopes.cc » ('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 e7edbcd34298fa104350550d8ea502d659805c2f..012744992fe783fa072249be7f7454de7699e7ca 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -208,8 +208,8 @@ int ScopeInfo::ContextLength() {
FunctionVariableField::decode(Flags()) == CONTEXT;
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() == ARROW_SCOPE && CallsSloppyEval()) ||
+ (scope_type() == FUNCTION_SCOPE && CallsSloppyEval()) ||
scope_type() == MODULE_SCOPE;
if (has_context) {
return Context::MIN_CONTEXT_SLOTS + context_locals +
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698