| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 typedef v8::internal::Literal* Literal; | 367 typedef v8::internal::Literal* Literal; |
| 368 typedef ObjectLiteral::Property* ObjectLiteralProperty; | 368 typedef ObjectLiteral::Property* ObjectLiteralProperty; |
| 369 typedef ZoneList<v8::internal::Expression*>* ExpressionList; | 369 typedef ZoneList<v8::internal::Expression*>* ExpressionList; |
| 370 typedef ZoneList<ObjectLiteral::Property*>* PropertyList; | 370 typedef ZoneList<ObjectLiteral::Property*>* PropertyList; |
| 371 typedef ZoneList<v8::internal::Statement*>* StatementList; | 371 typedef ZoneList<v8::internal::Statement*>* StatementList; |
| 372 | 372 |
| 373 // For constructing objects returned by the traversing functions. | 373 // For constructing objects returned by the traversing functions. |
| 374 typedef AstNodeFactory<AstConstructionVisitor> Factory; | 374 typedef AstNodeFactory<AstConstructionVisitor> Factory; |
| 375 }; | 375 }; |
| 376 | 376 |
| 377 class Checkpoint; | |
| 378 | |
| 379 explicit ParserTraits(Parser* parser) : parser_(parser) {} | 377 explicit ParserTraits(Parser* parser) : parser_(parser) {} |
| 380 | 378 |
| 381 // Custom operations executed when FunctionStates are created and destructed. | 379 // Custom operations executed when FunctionStates are created and destructed. |
| 382 template <typename FunctionState> | 380 template <typename FunctionState> |
| 383 static void SetUpFunctionState(FunctionState* function_state) { | 381 static void SetUpFunctionState(FunctionState* function_state) { |
| 384 function_state->saved_id_gen_ = *function_state->ast_node_id_gen_; | 382 function_state->saved_id_gen_ = *function_state->ast_node_id_gen_; |
| 385 *function_state->ast_node_id_gen_ = | 383 *function_state->ast_node_id_gen_ = |
| 386 AstNode::IdGen(BailoutId::FirstUsable().ToInt()); | 384 AstNode::IdGen(BailoutId::FirstUsable().ToInt()); |
| 387 } | 385 } |
| 388 | 386 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 private: | 923 private: |
| 926 static const int kLiteralTypeSlot = 0; | 924 static const int kLiteralTypeSlot = 0; |
| 927 static const int kElementsSlot = 1; | 925 static const int kElementsSlot = 1; |
| 928 | 926 |
| 929 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 927 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 930 }; | 928 }; |
| 931 | 929 |
| 932 } } // namespace v8::internal | 930 } } // namespace v8::internal |
| 933 | 931 |
| 934 #endif // V8_PARSER_H_ | 932 #endif // V8_PARSER_H_ |
| OLD | NEW |