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

Unified Diff: src/scopes.h

Issue 1164073003: [es6] super.prop, eval and lazy functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make the logger use 2 fields Created 5 years, 6 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/preparser.cc ('k') | test/cctest/test-parsing.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 016fc7f7c3d852ccfd58ad68e6cd0d2f903eafb1..c6baba5e29d07abf52c3b3473349dd16e6a5a7bc 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -317,9 +317,12 @@ class Scope: public ZoneObject {
bool inner_uses_arguments() const { return inner_scope_uses_arguments_; }
// Does this scope access "super" property (super.foo).
bool uses_super_property() const { return scope_uses_super_property_; }
- // Does any inner scope access "super" property.
- bool inner_uses_super_property() const {
- return inner_scope_uses_super_property_;
+
+ bool NeedsHomeObject() const {
+ return scope_uses_super_property_ ||
+ (scope_calls_eval_ && (IsConciseMethod(function_kind()) ||
+ IsAccessorFunction(function_kind()) ||
+ IsConstructor(function_kind())));
}
const Scope* NearestOuterEvalScope() const {
@@ -611,7 +614,6 @@ class Scope: public ZoneObject {
bool outer_scope_calls_sloppy_eval_;
bool inner_scope_calls_eval_;
bool inner_scope_uses_arguments_;
- bool inner_scope_uses_super_property_;
bool force_eager_compilation_;
bool force_context_allocation_;
« no previous file with comments | « src/preparser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698