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()) || |