Chromium Code Reviews| Index: src/parser.h |
| diff --git a/src/parser.h b/src/parser.h |
| index 8a3be4ef16cb5daf00e788e3c457da80c11f7ab1..5015ae0e1128110aff7b2b5a0696515701178f6f 100644 |
| --- a/src/parser.h |
| +++ b/src/parser.h |
| @@ -488,7 +488,6 @@ class Parser BASE_EMBEDDED { |
| public: |
| FunctionState(Parser* parser, |
| Scope* scope, |
| - bool is_generator, |
| Isolate* isolate); |
| ~FunctionState(); |
| @@ -519,7 +518,17 @@ class Parser BASE_EMBEDDED { |
| void AddProperty() { expected_property_count_++; } |
| int expected_property_count() { return expected_property_count_; } |
| - bool is_generator() const { return is_generator_; } |
| + void set_generator_object_variable(Variable *variable) { |
| + ASSERT(variable != NULL); |
| + ASSERT(!is_generator()); |
| + generator_object_variable_ = variable; |
| + } |
| + Variable* generator_object_variable() const { |
| + return generator_object_variable_; |
| + } |
| + bool is_generator() const { |
| + return generator_object_variable_ != NULL; |
| + } |
| AstNodeFactory<AstConstructionVisitor>* factory() { return &factory_; } |
| @@ -535,9 +544,6 @@ class Parser BASE_EMBEDDED { |
| // 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_; |
| @@ -546,6 +552,7 @@ class Parser BASE_EMBEDDED { |
| Parser* parser_; |
| FunctionState* outer_function_state_; |
| Scope* outer_scope_; |
| + Variable* generator_object_variable_; |
|
Michael Starzinger
2013/04/11 19:17:39
nit: Can we move this up a few lines to the commen
wingo
2013/04/12 10:50:17
Done. The comment ended up being a little more ve
|
| int saved_ast_node_id_; |
| AstNodeFactory<AstConstructionVisitor> factory_; |
| }; |