Chromium Code Reviews| Index: src/parser.h |
| diff --git a/src/parser.h b/src/parser.h |
| index 4aa6f719f3b9361d7cf6a1622f4cc7cc8dd0f908..0febdb6ae2e8fa333a1418bf9f3a947e7522f79a 100644 |
| --- a/src/parser.h |
| +++ b/src/parser.h |
| @@ -378,17 +378,17 @@ class ParserTraits { |
| explicit ParserTraits(Parser* parser) : parser_(parser) {} |
| // Custom operations executed when FunctionStates are created and destructed. |
| - template<typename FunctionState> |
| - static void SetUpFunctionState(FunctionState* function_state, Zone* zone) { |
| - Isolate* isolate = zone->isolate(); |
| - function_state->saved_ast_node_id_ = isolate->ast_node_id(); |
| - isolate->set_ast_node_id(BailoutId::FirstUsable().ToInt()); |
| + template <typename FunctionState> |
| + static void SetUpFunctionState(FunctionState* function_state) { |
| + function_state->saved_id_gen_ = *(function_state->ast_node_id_gen_); |
|
rossberg
2014/08/21 13:43:35
Nit: redundant (and IMO confusing) parens here and
marja
2014/08/22 07:59:07
Done.
|
| + *(function_state->ast_node_id_gen_) = |
| + AstNode::IdGen(BailoutId::FirstUsable().ToInt()); |
| } |
| - template<typename FunctionState> |
| - static void TearDownFunctionState(FunctionState* function_state, Zone* zone) { |
| + template <typename FunctionState> |
| + static void TearDownFunctionState(FunctionState* function_state) { |
| if (function_state->outer_function_state_ != NULL) { |
| - zone->isolate()->set_ast_node_id(function_state->saved_ast_node_id_); |
| + *(function_state->ast_node_id_gen_) = function_state->saved_id_gen_; |
| } |
| } |