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

Unified Diff: src/ast/scopes.h

Issue 2268333002: Move scope_uses_super_property_ to DeclarationScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 1ea06bccc44bc0c9951f07412fa68ec6a4ab5d6b..fae921e3ef3dea51c32f46df98949d6bfa96d5da 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -231,9 +231,6 @@ class Scope: public ZoneObject {
}
}
- // Inform the scope that the corresponding code uses "super".
- void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; }
-
// Set the language mode flag (unless disabled by a global flag).
void SetLanguageMode(LanguageMode language_mode) {
DCHECK(!is_module_scope() || is_strict(language_mode));
@@ -319,8 +316,6 @@ class Scope: public ZoneObject {
}
bool IsAsmModule() const;
bool IsAsmFunction() const;
- // Does this scope access "super" property (super.foo).
- bool uses_super_property() const { return scope_uses_super_property_; }
// Does this scope have the potential to execute declarations non-linearly?
bool is_nonlinear() const { return scope_nonlinear_; }
@@ -518,8 +513,6 @@ class Scope: public ZoneObject {
// This scope or a nested catch scope or with scope contain an 'eval' call. At
// the 'eval' call site this scope is the declaration scope.
bool scope_calls_eval_ : 1;
- // This scope uses "super" property ('super.foo').
- bool scope_uses_super_property_ : 1;
// This scope's declarations might not be executed in order (e.g., switch).
bool scope_nonlinear_ : 1;
bool is_hidden_ : 1;
@@ -676,6 +669,11 @@ class DeclarationScope : public Scope {
return is_function_scope() && IsArrowFunction(function_kind_);
}
+ // Inform the scope that the corresponding code uses "super".
+ void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; }
+ // Does this scope access "super" property (super.foo).
+ bool uses_super_property() const { return scope_uses_super_property_; }
+
bool NeedsHomeObject() const {
return scope_uses_super_property_ ||
(inner_scope_calls_eval_ && (IsConciseMethod(function_kind()) ||
@@ -886,6 +884,8 @@ class DeclarationScope : public Scope {
bool force_eager_compilation_ : 1;
// This scope has a parameter called "arguments".
bool has_arguments_parameter_ : 1;
+ // This scope uses "super" property ('super.foo').
+ bool scope_uses_super_property_ : 1;
// Info about the parameter list of a function.
int arity_;
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698