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

Unified Diff: src/scopes.h

Issue 1292753007: [es6] Parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 years, 4 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') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 2f600b9f0cbc3aa244a94840e6450a96419a549e..4990fab994574a9fb9fbb27814ba93faf3ad5c86 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -284,7 +284,7 @@ class Scope: public ZoneObject {
// Information about which scopes calls eval.
bool calls_eval() const { return scope_calls_eval_; }
- bool calls_sloppy_eval() {
+ bool calls_sloppy_eval() const {
return scope_calls_eval_ && is_sloppy(language_mode_);
}
bool outer_scope_calls_sloppy_eval() const {
@@ -305,6 +305,9 @@ class Scope: public ZoneObject {
// Does this scope access "super" property (super.foo).
bool uses_super_property() const { return scope_uses_super_property_; }
+ // Whether this needs to be represented by a runtime context.
+ bool NeedsContext() const { return num_heap_slots() > 0; }
+
bool NeedsHomeObject() const {
return scope_uses_super_property_ ||
(scope_calls_eval_ && (IsConciseMethod(function_kind()) ||
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698