Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: runtime/vm/parser.h

Issue 944893005: Implement async* functions in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 void ChainNewBlock(LocalScope* outer_scope); 556 void ChainNewBlock(LocalScope* outer_scope);
557 void OpenBlock(); 557 void OpenBlock();
558 void OpenLoopBlock(); 558 void OpenLoopBlock();
559 void OpenFunctionBlock(const Function& func); 559 void OpenFunctionBlock(const Function& func);
560 void OpenAsyncClosure(); 560 void OpenAsyncClosure();
561 RawFunction* OpenAsyncFunction(intptr_t formal_param_pos); 561 RawFunction* OpenAsyncFunction(intptr_t formal_param_pos);
562 RawFunction* OpenSyncGeneratorFunction(intptr_t func_pos); 562 RawFunction* OpenSyncGeneratorFunction(intptr_t func_pos);
563 SequenceNode* CloseSyncGenFunction(const Function& closure, 563 SequenceNode* CloseSyncGenFunction(const Function& closure,
564 SequenceNode* closure_node); 564 SequenceNode* closure_node);
565 void AddSyncGenClosureParameters(ParamList* params); 565 void AddSyncGenClosureParameters(ParamList* params);
566 void AddAsyncGenClosureParameters(ParamList* params);
567
568 // Support for async* functions.
569 RawFunction* OpenAsyncGeneratorFunction(intptr_t func_pos);
570 SequenceNode* CloseAsyncGeneratorFunction(const Function& closure,
571 SequenceNode* closure_node);
572 void OpenAsyncGeneratorClosure();
573 SequenceNode* CloseAsyncGeneratorClosure(SequenceNode* body);
574
566 void OpenAsyncTryBlock(); 575 void OpenAsyncTryBlock();
567 SequenceNode* CloseBlock(); 576 SequenceNode* CloseBlock();
568 SequenceNode* CloseAsyncFunction(const Function& closure, 577 SequenceNode* CloseAsyncFunction(const Function& closure,
569 SequenceNode* closure_node); 578 SequenceNode* closure_node);
579
570 SequenceNode* CloseAsyncClosure(SequenceNode* body); 580 SequenceNode* CloseAsyncClosure(SequenceNode* body);
571 SequenceNode* CloseAsyncTryBlock(SequenceNode* try_block); 581 SequenceNode* CloseAsyncTryBlock(SequenceNode* try_block);
582 SequenceNode* CloseAsyncGeneratorTryBlock(SequenceNode *body);
583
572 void AddAsyncClosureParameters(ParamList* params); 584 void AddAsyncClosureParameters(ParamList* params);
573 void AddContinuationVariables(); 585 void AddContinuationVariables();
574 void AddAsyncClosureVariables(); 586 void AddAsyncClosureVariables();
575 587 void AddAsyncGeneratorVariables();
576 588
577 LocalVariable* LookupPhaseParameter(); 589 LocalVariable* LookupPhaseParameter();
578 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); 590 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only);
579 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, 591 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope,
580 bool test_only); 592 bool test_only);
581 void CaptureInstantiator(); 593 void CaptureInstantiator();
582 AstNode* LoadReceiver(intptr_t token_pos); 594 AstNode* LoadReceiver(intptr_t token_pos);
583 AstNode* LoadFieldIfUnresolved(AstNode* node); 595 AstNode* LoadFieldIfUnresolved(AstNode* node);
584 AstNode* LoadClosure(PrimaryNode* primary); 596 AstNode* LoadClosure(PrimaryNode* primary);
585 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); 597 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node); 636 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node);
625 AstNode* ParseTryStatement(String* label_name); 637 AstNode* ParseTryStatement(String* label_name);
626 RawAbstractType* ParseConstFinalVarOrType( 638 RawAbstractType* ParseConstFinalVarOrType(
627 ClassFinalizer::FinalizationKind finalization); 639 ClassFinalizer::FinalizationKind finalization);
628 AstNode* ParseVariableDeclaration(const AbstractType& type, 640 AstNode* ParseVariableDeclaration(const AbstractType& type,
629 bool is_final, 641 bool is_final,
630 bool is_const, 642 bool is_const,
631 SequenceNode** await_preamble); 643 SequenceNode** await_preamble);
632 AstNode* ParseVariableDeclarationList(); 644 AstNode* ParseVariableDeclarationList();
633 AstNode* ParseFunctionStatement(bool is_literal); 645 AstNode* ParseFunctionStatement(bool is_literal);
646 AstNode* ParseYieldStatement();
634 AstNode* ParseStatement(); 647 AstNode* ParseStatement();
635 SequenceNode* ParseNestedStatement(bool parsing_loop_body, 648 SequenceNode* ParseNestedStatement(bool parsing_loop_body,
636 SourceLabel* label); 649 SourceLabel* label);
637 void ParseStatementSequence(); 650 void ParseStatementSequence();
638 bool IsIdentifier(); 651 bool IsIdentifier();
639 bool IsSimpleLiteral(const AbstractType& type, Instance* value); 652 bool IsSimpleLiteral(const AbstractType& type, Instance* value);
640 bool IsFunctionTypeAliasName(); 653 bool IsFunctionTypeAliasName();
641 bool IsMixinAppAlias(); 654 bool IsMixinAppAlias();
642 bool TryParseQualIdent(); 655 bool TryParseQualIdent();
643 bool TryParseTypeParameters(); 656 bool TryParseTypeParameters();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 857
845 // Indentation of parser trace. 858 // Indentation of parser trace.
846 intptr_t trace_indent_; 859 intptr_t trace_indent_;
847 860
848 DISALLOW_COPY_AND_ASSIGN(Parser); 861 DISALLOW_COPY_AND_ASSIGN(Parser);
849 }; 862 };
850 863
851 } // namespace dart 864 } // namespace dart
852 865
853 #endif // VM_PARSER_H_ 866 #endif // VM_PARSER_H_
OLDNEW
« runtime/lib/core_patch.dart ('K') | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698