Index: src/scopes.h |
diff --git a/src/scopes.h b/src/scopes.h |
index 3ca2dcf0ce259c6fafc57bb05a3e4bbf2160671e..2688cfa6c9976710b1d251b4707dee6bd4efeb98 100644 |
--- a/src/scopes.h |
+++ b/src/scopes.h |
@@ -308,6 +308,10 @@ class Scope: public ZoneObject { |
// Does this scope contain a with statement. |
bool contains_with() const { return scope_contains_with_; } |
+ // If this scope is in a function that is a generator. |
+ bool inside_generator() const { return scope_inside_generator_; } |
+ void set_inside_generator(bool inside) { scope_inside_generator_ = inside; } |
+ |
// --------------------------------------------------------------------------- |
// Accessors. |
@@ -481,6 +485,8 @@ class Scope: public ZoneObject { |
bool scope_inside_with_; |
// This scope contains a 'with' statement. |
bool scope_contains_with_; |
+ // This scope is in a function that is a generator. |
+ bool scope_inside_generator_; |
// 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_; |