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

Unified Diff: src/scopes.h

Issue 13408005: Force context allocation for variables in generator scopes. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 8 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/parser.cc ('k') | src/scopes.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 3ca2dcf0ce259c6fafc57bb05a3e4bbf2160671e..66384a1c09462c1620b27f74b548705bbcf39ef3 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -269,6 +269,15 @@ class Scope: public ZoneObject {
end_position_ = statement_pos;
}
+ // In some cases we want to force context allocation for a whole scope.
+ void ForceContextAllocation() {
+ ASSERT(!already_resolved());
+ force_context_allocation_ = true;
+ }
+ bool has_forced_context_allocation() const {
+ return force_context_allocation_;
+ }
+
// ---------------------------------------------------------------------------
// Predicates.
@@ -494,6 +503,7 @@ class Scope: public ZoneObject {
bool outer_scope_calls_non_strict_eval_;
bool inner_scope_calls_eval_;
bool force_eager_compilation_;
+ bool force_context_allocation_;
// True if it doesn't need scope resolution (e.g., if the scope was
// constructed based on a serialized scope info or a catch context).
« no previous file with comments | « src/parser.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698