| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_PARSER_H_ | 5 #ifndef VM_PARSER_H_ |
| 6 #define VM_PARSER_H_ | 6 #define VM_PARSER_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 AstNode* MakeStaticCall(const char* class_name, | 460 AstNode* MakeStaticCall(const char* class_name, |
| 461 const char* function_name, | 461 const char* function_name, |
| 462 ArgumentListNode* arguments); | 462 ArgumentListNode* arguments); |
| 463 String& Interpolate(ArrayNode* values); | 463 String& Interpolate(ArrayNode* values); |
| 464 AstNode* MakeAssertCall(intptr_t begin, intptr_t end); | 464 AstNode* MakeAssertCall(intptr_t begin, intptr_t end); |
| 465 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type); | 465 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type); |
| 466 | 466 |
| 467 void CheckFunctionIsCallable(intptr_t token_index, const Function& function); | 467 void CheckFunctionIsCallable(intptr_t token_index, const Function& function); |
| 468 void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token); | 468 void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token); |
| 469 | 469 |
| 470 const LocalVariable& GetIncrementTempLocal(); |
| 470 | 471 |
| 471 const Script& script_; | 472 const Script& script_; |
| 472 const TokenStream& tokens_; | 473 const TokenStream& tokens_; |
| 473 intptr_t token_index_; | 474 intptr_t token_index_; |
| 474 Token::Kind token_kind_; // Cached token kind for the token_index_. | 475 Token::Kind token_kind_; // Cached token kind for the token_index_. |
| 475 Block* current_block_; | 476 Block* current_block_; |
| 476 | 477 |
| 477 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 478 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
| 478 // that is interface and class definitions. | 479 // that is interface and class definitions. |
| 479 bool is_top_level_; | 480 bool is_top_level_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 494 Class& current_class_; | 495 Class& current_class_; |
| 495 | 496 |
| 496 // The current library (and thus class dictionary) used to resolve names. | 497 // The current library (and thus class dictionary) used to resolve names. |
| 497 const Library& library_; | 498 const Library& library_; |
| 498 | 499 |
| 499 // List of try blocks seen so far, this is used to generate inlined finally | 500 // List of try blocks seen so far, this is used to generate inlined finally |
| 500 // code at all points in the try block where an exit from the block is | 501 // code at all points in the try block where an exit from the block is |
| 501 // done using 'return', 'break' or 'continue' statements. | 502 // done using 'return', 'break' or 'continue' statements. |
| 502 TryBlocks* try_blocks_list_; | 503 TryBlocks* try_blocks_list_; |
| 503 | 504 |
| 505 // Allocate temporary only once per function. |
| 506 LocalVariable* increment_temp_; |
| 507 |
| 504 DISALLOW_COPY_AND_ASSIGN(Parser); | 508 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 505 }; | 509 }; |
| 506 | 510 |
| 507 } // namespace dart | 511 } // namespace dart |
| 508 | 512 |
| 509 #endif // VM_PARSER_H_ | 513 #endif // VM_PARSER_H_ |
| OLD | NEW |