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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |