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

Unified Diff: src/ast/scopes.h

Issue 2263123002: Find the last outer eval scope to check in fullcodegen rather than scope analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports 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 1bf541944a0298aafd7c009141aae882db52dec2..0b84d630b91325343c6f77dd29f3ae31f6e257c3 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -310,9 +310,6 @@ class Scope: public ZoneObject {
bool calls_sloppy_eval() const {
return scope_calls_eval_ && is_sloppy(language_mode());
}
- bool outer_scope_calls_sloppy_eval() const {
- return outer_scope_calls_sloppy_eval_;
- }
bool IsAsmModule() const;
bool IsAsmFunction() const;
// Does this scope access "super" property (super.foo).
@@ -383,7 +380,11 @@ class Scope: public ZoneObject {
bool AllowsLazyCompilationWithoutContext() const;
// The number of contexts between this and scope; zero if this == scope.
- int ContextChainLength(Scope* scope);
+ int ContextChainLength(Scope* scope) const;
+
+ // The number of contexts between this and the outermost context that has a
+ // sloppy eval call. One if this->calls_sloppy_eval().
+ int ContextChainLengthUntilOutermostSloppyEval() const;
// The maximum number of nested contexts required for this scope and any inner
// scopes.
@@ -512,7 +513,6 @@ class Scope: public ZoneObject {
bool is_debug_evaluate_scope_ : 1;
// Computed via PropagateScopeInfo.
- bool outer_scope_calls_sloppy_eval_ : 1;
bool inner_scope_calls_eval_ : 1;
bool force_eager_compilation_ : 1;
bool force_context_allocation_ : 1;
@@ -591,7 +591,7 @@ class Scope: public ZoneObject {
VariableProxy* stack = nullptr);
// Scope analysis.
- void PropagateScopeInfo(bool outer_scope_calls_sloppy_eval);
+ void PropagateScopeInfo();
// Predicates.
bool MustAllocate(Variable* var);
« 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