| 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 "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 void ChainNewBlock(LocalScope* outer_scope); | 534 void ChainNewBlock(LocalScope* outer_scope); |
| 535 void OpenBlock(); | 535 void OpenBlock(); |
| 536 void OpenLoopBlock(); | 536 void OpenLoopBlock(); |
| 537 void OpenFunctionBlock(const Function& func); | 537 void OpenFunctionBlock(const Function& func); |
| 538 void OpenAsyncClosure(); | 538 void OpenAsyncClosure(); |
| 539 RawFunction* OpenAsyncFunction(intptr_t formal_param_pos); | 539 RawFunction* OpenAsyncFunction(intptr_t formal_param_pos); |
| 540 RawFunction* OpenSyncGeneratorFunction(intptr_t func_pos); | 540 RawFunction* OpenSyncGeneratorFunction(intptr_t func_pos); |
| 541 SequenceNode* CloseSyncGenFunction(const Function& closure, | 541 SequenceNode* CloseSyncGenFunction(const Function& closure, |
| 542 SequenceNode* closure_node); | 542 SequenceNode* closure_node); |
| 543 void AddSyncGenClosureParameters(ParamList* params); | 543 void AddSyncGenClosureParameters(ParamList* params); |
| 544 void AddAsyncGenClosureParameters(ParamList* params); |
| 545 |
| 546 // Support for async* functions. |
| 547 RawFunction* OpenAsyncGeneratorFunction(intptr_t func_pos); |
| 548 SequenceNode* CloseAsyncGeneratorFunction(const Function& closure, |
| 549 SequenceNode* closure_node); |
| 550 void OpenAsyncGeneratorClosure(); |
| 551 SequenceNode* CloseAsyncGeneratorClosure(SequenceNode* body); |
| 552 |
| 544 void OpenAsyncTryBlock(); | 553 void OpenAsyncTryBlock(); |
| 545 SequenceNode* CloseBlock(); | 554 SequenceNode* CloseBlock(); |
| 546 SequenceNode* CloseAsyncFunction(const Function& closure, | 555 SequenceNode* CloseAsyncFunction(const Function& closure, |
| 547 SequenceNode* closure_node); | 556 SequenceNode* closure_node); |
| 557 |
| 548 SequenceNode* CloseAsyncClosure(SequenceNode* body); | 558 SequenceNode* CloseAsyncClosure(SequenceNode* body); |
| 549 SequenceNode* CloseAsyncTryBlock(SequenceNode* try_block); | 559 SequenceNode* CloseAsyncTryBlock(SequenceNode* try_block); |
| 560 SequenceNode* CloseAsyncGeneratorTryBlock(SequenceNode *body); |
| 561 |
| 550 void AddAsyncClosureParameters(ParamList* params); | 562 void AddAsyncClosureParameters(ParamList* params); |
| 551 void AddContinuationVariables(); | 563 void AddContinuationVariables(); |
| 552 void AddAsyncClosureVariables(); | 564 void AddAsyncClosureVariables(); |
| 553 | 565 void AddAsyncGeneratorVariables(); |
| 554 | 566 |
| 555 LocalVariable* LookupPhaseParameter(); | 567 LocalVariable* LookupPhaseParameter(); |
| 556 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); | 568 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); |
| 557 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, | 569 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, |
| 558 bool test_only); | 570 bool test_only); |
| 559 void CaptureInstantiator(); | 571 void CaptureInstantiator(); |
| 560 AstNode* LoadReceiver(intptr_t token_pos); | 572 AstNode* LoadReceiver(intptr_t token_pos); |
| 561 AstNode* LoadFieldIfUnresolved(AstNode* node); | 573 AstNode* LoadFieldIfUnresolved(AstNode* node); |
| 562 AstNode* LoadClosure(PrimaryNode* primary); | 574 AstNode* LoadClosure(PrimaryNode* primary); |
| 563 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); | 575 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node); | 619 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node); |
| 608 AstNode* ParseTryStatement(String* label_name); | 620 AstNode* ParseTryStatement(String* label_name); |
| 609 RawAbstractType* ParseConstFinalVarOrType( | 621 RawAbstractType* ParseConstFinalVarOrType( |
| 610 ClassFinalizer::FinalizationKind finalization); | 622 ClassFinalizer::FinalizationKind finalization); |
| 611 AstNode* ParseVariableDeclaration(const AbstractType& type, | 623 AstNode* ParseVariableDeclaration(const AbstractType& type, |
| 612 bool is_final, | 624 bool is_final, |
| 613 bool is_const, | 625 bool is_const, |
| 614 SequenceNode** await_preamble); | 626 SequenceNode** await_preamble); |
| 615 AstNode* ParseVariableDeclarationList(); | 627 AstNode* ParseVariableDeclarationList(); |
| 616 AstNode* ParseFunctionStatement(bool is_literal); | 628 AstNode* ParseFunctionStatement(bool is_literal); |
| 629 AstNode* ParseYieldStatement(); |
| 617 AstNode* ParseStatement(); | 630 AstNode* ParseStatement(); |
| 618 SequenceNode* ParseNestedStatement(bool parsing_loop_body, | 631 SequenceNode* ParseNestedStatement(bool parsing_loop_body, |
| 619 SourceLabel* label); | 632 SourceLabel* label); |
| 620 void ParseStatementSequence(); | 633 void ParseStatementSequence(); |
| 621 bool IsIdentifier(); | 634 bool IsIdentifier(); |
| 622 bool IsSimpleLiteral(const AbstractType& type, Instance* value); | 635 bool IsSimpleLiteral(const AbstractType& type, Instance* value); |
| 623 bool IsFunctionTypeAliasName(); | 636 bool IsFunctionTypeAliasName(); |
| 624 bool IsMixinAppAlias(); | 637 bool IsMixinAppAlias(); |
| 625 bool TryParseQualIdent(); | 638 bool TryParseQualIdent(); |
| 626 bool TryParseTypeParameters(); | 639 bool TryParseTypeParameters(); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 837 |
| 825 // Indentation of parser trace. | 838 // Indentation of parser trace. |
| 826 intptr_t trace_indent_; | 839 intptr_t trace_indent_; |
| 827 | 840 |
| 828 DISALLOW_COPY_AND_ASSIGN(Parser); | 841 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 829 }; | 842 }; |
| 830 | 843 |
| 831 } // namespace dart | 844 } // namespace dart |
| 832 | 845 |
| 833 #endif // VM_PARSER_H_ | 846 #endif // VM_PARSER_H_ |
| OLD | NEW |