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

Unified Diff: src/scopes.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 | « src/scopeinfo.cc ('k') | test/mjsunit/harmony/regress/regress-4056.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index b8f7eb8698632e95f6bf3c5801298d1d34b88cd8..b2efd3d2210e3e9a4a031a08cc62ce4ce18795c8 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -1464,7 +1464,7 @@ void Scope::AllocateVariablesRecursively(Isolate* isolate) {
// even if no local variables were statically allocated in the scope.
// Likewise for modules.
bool must_have_context = is_with_scope() || is_module_scope() ||
- (is_function_scope() && calls_eval());
+ (is_function_scope() && calls_sloppy_eval());
// If we didn't allocate any locals in the local context, then we only
// need the minimal number of slots if we must have a context.
« no previous file with comments | « src/scopeinfo.cc ('k') | test/mjsunit/harmony/regress/regress-4056.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698