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

Unified Diff: src/ast/scopes.h

Issue 2427503002: Also mark the script-scope for eager compilation upon ForceEagerCompilation (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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 b1e2c2894df4bcf93e063acda6d2e608dcce2df6..478470eadbc776c83df449469e3ac99f8dda4897 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -791,10 +791,12 @@ class DeclarationScope : public Scope {
// Make sure this closure and all outer closures are eagerly compiled.
void ForceEagerCompilation() {
DCHECK_EQ(this, GetClosureScope());
- for (DeclarationScope* s = this; !s->is_script_scope();
+ DeclarationScope* s;
+ for (s = this; !s->is_script_scope();
s = s->outer_scope()->GetClosureScope()) {
s->force_eager_compilation_ = true;
}
+ s->force_eager_compilation_ = true;
}
#ifdef DEBUG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698