| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 RawClass* CheckCaseExpressions(const GrowableArray<LiteralNode*>& values); | 585 RawClass* CheckCaseExpressions(const GrowableArray<LiteralNode*>& values); |
| 586 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value, | 586 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value, |
| 587 GrowableArray<LiteralNode*>* case_expr_values, | 587 GrowableArray<LiteralNode*>* case_expr_values, |
| 588 SourceLabel* case_label); | 588 SourceLabel* case_label); |
| 589 AstNode* ParseSwitchStatement(String* label_name); | 589 AstNode* ParseSwitchStatement(String* label_name); |
| 590 | 590 |
| 591 // try/catch/finally parsing. | 591 // try/catch/finally parsing. |
| 592 void AddCatchParamsToScope(CatchParamDesc* exception_param, | 592 void AddCatchParamsToScope(CatchParamDesc* exception_param, |
| 593 CatchParamDesc* stack_trace_param, | 593 CatchParamDesc* stack_trace_param, |
| 594 LocalScope* scope); | 594 LocalScope* scope); |
| 595 void SetupSavedExceptionAndStacktrace(); | |
| 596 void SaveExceptionAndStacktrace(LocalVariable* exception_var, | 595 void SaveExceptionAndStacktrace(LocalVariable* exception_var, |
| 597 LocalVariable* stack_trace_var); | 596 LocalVariable* stack_trace_var, |
| 597 LocalVariable* saved_exception_var, |
| 598 LocalVariable* saved_stack_trace_var); |
| 598 // Parse all the catch clause of a try. | 599 // Parse all the catch clause of a try. |
| 599 SequenceNode* ParseCatchClauses(intptr_t handler_pos, | 600 SequenceNode* ParseCatchClauses(intptr_t handler_pos, |
| 600 LocalVariable* exception_var, | 601 LocalVariable* exception_var, |
| 601 LocalVariable* stack_trace_var, | 602 LocalVariable* stack_trace_var, |
| 603 LocalVariable* rethrow_exception_var, |
| 604 LocalVariable* rethrow_stack_trace_var, |
| 602 const GrowableObjectArray& handler_types, | 605 const GrowableObjectArray& handler_types, |
| 603 bool* needs_stack_trace); | 606 bool* needs_stack_trace); |
| 604 // Parse finally block and create an AST for it. | 607 // Parse finally block and create an AST for it. |
| 605 SequenceNode* ParseFinallyBlock(); | 608 SequenceNode* ParseFinallyBlock(); |
| 606 // Adds try block to the list of try blocks seen so far. | 609 // Adds try block to the list of try blocks seen so far. |
| 607 void PushTryBlock(Block* try_block); | 610 void PushTryBlock(Block* try_block); |
| 608 // Pops the inner most try block from the list. | 611 // Pops the inner most try block from the list. |
| 609 TryBlocks* PopTryBlock(); | 612 TryBlocks* PopTryBlock(); |
| 610 // Collect try block scopes and indices if await or yield is in try block. | 613 // Collect try block scopes and indices if await or yield is in try block. |
| 611 void CheckAsyncOpInTryBlock(LocalScope** try_scope, | 614 void CheckAsyncOpInTryBlock(LocalScope** try_scope, |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 840 |
| 838 // Indentation of parser trace. | 841 // Indentation of parser trace. |
| 839 intptr_t trace_indent_; | 842 intptr_t trace_indent_; |
| 840 | 843 |
| 841 DISALLOW_COPY_AND_ASSIGN(Parser); | 844 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 842 }; | 845 }; |
| 843 | 846 |
| 844 } // namespace dart | 847 } // namespace dart |
| 845 | 848 |
| 846 #endif // VM_PARSER_H_ | 849 #endif // VM_PARSER_H_ |
| OLD | NEW |