Index: src/parser.h |
diff --git a/src/parser.h b/src/parser.h |
index fc4aba2b9f25d76feeaea2480d180c44bbf86623..dcfe4449059d15fd16afa7c07782ad2b822d23c3 100644 |
--- a/src/parser.h |
+++ b/src/parser.h |
@@ -474,7 +474,6 @@ class Parser { |
public: |
FunctionState(Parser* parser, |
Scope* scope, |
- bool is_generator, |
Isolate* isolate); |
~FunctionState(); |
@@ -505,7 +504,17 @@ class Parser { |
void AddProperty() { expected_property_count_++; } |
int expected_property_count() { return expected_property_count_; } |
- bool is_generator() const { return is_generator_; } |
+ void set_generator_iterator_variable(Variable *variable) { |
+ ASSERT(variable != NULL); |
+ ASSERT(!is_generator()); |
+ generator_iterator_variable_ = variable; |
+ } |
+ Variable* generator_iterator_variable() const { |
+ return generator_iterator_variable_; |
+ } |
+ bool is_generator() const { |
+ return generator_iterator_variable_ != NULL; |
+ } |
AstNodeFactory<AstConstructionVisitor>* factory() { return &factory_; } |
@@ -521,9 +530,6 @@ class Parser { |
// Properties count estimation. |
int expected_property_count_; |
- // Indicates that this function is a generator. |
- bool is_generator_; |
- |
// Keeps track of assignments to properties of this. Used for |
// optimizing constructors. |
bool only_simple_this_property_assignments_; |
@@ -532,6 +538,7 @@ class Parser { |
Parser* parser_; |
FunctionState* outer_function_state_; |
Scope* outer_scope_; |
+ Variable* generator_iterator_variable_; |
int saved_ast_node_id_; |
AstNodeFactory<AstConstructionVisitor> factory_; |
}; |