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

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

Issue 1079233002: Simplify restoring of saved try contexts in async code by passing around the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | « runtime/vm/ast_transformer.cc ('k') | 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Parse finally block and create an AST for it. 621 // Parse finally block and create an AST for it.
622 SequenceNode* ParseFinallyBlock(bool is_async, 622 SequenceNode* ParseFinallyBlock(bool is_async,
623 LocalVariable* exception_var, 623 LocalVariable* exception_var,
624 LocalVariable* stack_trace_var, 624 LocalVariable* stack_trace_var,
625 LocalVariable* rethrow_exception_var, 625 LocalVariable* rethrow_exception_var,
626 LocalVariable* rethrow_stack_trace_var); 626 LocalVariable* rethrow_stack_trace_var);
627 // Push try block onto the stack of try blocks in scope. 627 // Push try block onto the stack of try blocks in scope.
628 void PushTry(Block* try_block); 628 void PushTry(Block* try_block);
629 // Pop the inner most try block from the stack. 629 // Pop the inner most try block from the stack.
630 TryStack* PopTry(); 630 TryStack* PopTry();
631 // Collect try block scopes and indices if await or yield is in try block. 631 // Collect saved try context variables if await or yield is in try block.
632 void CheckAsyncOpInTryBlock(LocalScope** try_scope, 632 void CheckAsyncOpInTryBlock(
633 int16_t* try_index, 633 LocalVariable** saved_try_ctx,
634 LocalScope** outer_try_scope, 634 LocalVariable** async_saved_try_ctx,
635 int16_t* outer_try_index) const; 635 LocalVariable** outer_saved_try_ctx,
636 LocalVariable** outer_async_saved_try_ctx) const;
636 // Add specified node to try block list so that it can be patched with 637 // Add specified node to try block list so that it can be patched with
637 // inlined finally code if needed. 638 // inlined finally code if needed.
638 void AddNodeForFinallyInlining(AstNode* node); 639 void AddNodeForFinallyInlining(AstNode* node);
639 // Add the inlined finally block to the specified node. 640 // Add the inlined finally block to the specified node.
640 void AddFinallyBlockToNode(bool is_async, 641 void AddFinallyBlockToNode(bool is_async,
641 AstNode* node, 642 AstNode* node,
642 InlinedFinallyNode* finally_node); 643 InlinedFinallyNode* finally_node);
643 AstNode* ParseTryStatement(String* label_name); 644 AstNode* ParseTryStatement(String* label_name);
644 RawAbstractType* ParseConstFinalVarOrType( 645 RawAbstractType* ParseConstFinalVarOrType(
645 ClassFinalizer::FinalizationKind finalization); 646 ClassFinalizer::FinalizationKind finalization);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 863
863 // Indentation of parser trace. 864 // Indentation of parser trace.
864 intptr_t trace_indent_; 865 intptr_t trace_indent_;
865 866
866 DISALLOW_COPY_AND_ASSIGN(Parser); 867 DISALLOW_COPY_AND_ASSIGN(Parser);
867 }; 868 };
868 869
869 } // namespace dart 870 } // namespace dart
870 871
871 #endif // VM_PARSER_H_ 872 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698