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

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

Issue 981433002: Fix more async machinery (capture return value when necessary, issue 22620). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ASSERT(has_finally_return_temp_var()); 114 ASSERT(has_finally_return_temp_var());
115 return finally_return_temp_var_; 115 return finally_return_temp_var_;
116 } 116 }
117 void set_finally_return_temp_var(LocalVariable* value) { 117 void set_finally_return_temp_var(LocalVariable* value) {
118 ASSERT(!has_finally_return_temp_var()); 118 ASSERT(!has_finally_return_temp_var());
119 finally_return_temp_var_ = value; 119 finally_return_temp_var_ = value;
120 } 120 }
121 bool has_finally_return_temp_var() const { 121 bool has_finally_return_temp_var() const {
122 return finally_return_temp_var_ != NULL; 122 return finally_return_temp_var_ != NULL;
123 } 123 }
124 void EnsureFinallyReturnTemp(); 124 void EnsureFinallyReturnTemp(bool is_async);
125 125
126 LocalVariable* EnsureExpressionTemp(); 126 LocalVariable* EnsureExpressionTemp();
127 127
128 bool HasDeferredPrefixes() const { return deferred_prefixes_->length() != 0; } 128 bool HasDeferredPrefixes() const { return deferred_prefixes_->length() != 0; }
129 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes() const { 129 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes() const {
130 return deferred_prefixes_; 130 return deferred_prefixes_;
131 } 131 }
132 void AddDeferredPrefix(const LibraryPrefix& prefix); 132 void AddDeferredPrefix(const LibraryPrefix& prefix);
133 133
134 ZoneGrowableArray<const Field*>* guarded_fields() const { 134 ZoneGrowableArray<const Field*>* guarded_fields() const {
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 TryBlocks* PopTryBlock(); 625 TryBlocks* PopTryBlock();
626 // Collect try block scopes and indices if await or yield is in try block. 626 // Collect try block scopes and indices if await or yield is in try block.
627 void CheckAsyncOpInTryBlock(LocalScope** try_scope, 627 void CheckAsyncOpInTryBlock(LocalScope** try_scope,
628 int16_t* try_index, 628 int16_t* try_index,
629 LocalScope** outer_try_scope, 629 LocalScope** outer_try_scope,
630 int16_t* outer_try_index) const; 630 int16_t* outer_try_index) const;
631 // Add specified node to try block list so that it can be patched with 631 // Add specified node to try block list so that it can be patched with
632 // inlined finally code if needed. 632 // inlined finally code if needed.
633 void AddNodeForFinallyInlining(AstNode* node); 633 void AddNodeForFinallyInlining(AstNode* node);
634 // Add the inlined finally block to the specified node. 634 // Add the inlined finally block to the specified node.
635 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node); 635 void AddFinallyBlockToNode(bool is_async,
636 AstNode* node,
637 InlinedFinallyNode* finally_node);
636 AstNode* ParseTryStatement(String* label_name); 638 AstNode* ParseTryStatement(String* label_name);
637 RawAbstractType* ParseConstFinalVarOrType( 639 RawAbstractType* ParseConstFinalVarOrType(
638 ClassFinalizer::FinalizationKind finalization); 640 ClassFinalizer::FinalizationKind finalization);
639 AstNode* ParseVariableDeclaration(const AbstractType& type, 641 AstNode* ParseVariableDeclaration(const AbstractType& type,
640 bool is_final, 642 bool is_final,
641 bool is_const, 643 bool is_const,
642 SequenceNode** await_preamble); 644 SequenceNode** await_preamble);
643 AstNode* ParseVariableDeclarationList(); 645 AstNode* ParseVariableDeclarationList();
644 AstNode* ParseFunctionStatement(bool is_literal); 646 AstNode* ParseFunctionStatement(bool is_literal);
645 AstNode* ParseYieldStatement(); 647 AstNode* ParseYieldStatement();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 855
854 // Indentation of parser trace. 856 // Indentation of parser trace.
855 intptr_t trace_indent_; 857 intptr_t trace_indent_;
856 858
857 DISALLOW_COPY_AND_ASSIGN(Parser); 859 DISALLOW_COPY_AND_ASSIGN(Parser);
858 }; 860 };
859 861
860 } // namespace dart 862 } // namespace dart
861 863
862 #endif // VM_PARSER_H_ 864 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698