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

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

Issue 974073002: Fix async machinery for finally clauses (issues 22445, 22300). (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') | runtime/vm/parser.cc » ('J')
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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SaveExceptionAndStacktrace(LocalVariable* exception_var, 595 void SetupExceptionVariables(LocalScope* try_scope,
596 bool is_async,
597 LocalVariable** context_var,
598 LocalVariable** exception_var,
599 LocalVariable** stack_trace_var,
600 LocalVariable** saved_exception_var,
601 LocalVariable** saved_stack_trace_var);
602 void SaveExceptionAndStacktrace(SequenceNode* statements,
603 LocalVariable* exception_var,
596 LocalVariable* stack_trace_var, 604 LocalVariable* stack_trace_var,
597 LocalVariable* saved_exception_var, 605 LocalVariable* saved_exception_var,
598 LocalVariable* saved_stack_trace_var); 606 LocalVariable* saved_stack_trace_var);
599 // Parse all the catch clause of a try. 607 // Parse all the catch clause of a try.
600 SequenceNode* ParseCatchClauses(intptr_t handler_pos, 608 SequenceNode* ParseCatchClauses(intptr_t handler_pos,
609 bool is_async,
601 LocalVariable* exception_var, 610 LocalVariable* exception_var,
602 LocalVariable* stack_trace_var, 611 LocalVariable* stack_trace_var,
603 LocalVariable* rethrow_exception_var, 612 LocalVariable* rethrow_exception_var,
604 LocalVariable* rethrow_stack_trace_var, 613 LocalVariable* rethrow_stack_trace_var,
605 const GrowableObjectArray& handler_types, 614 const GrowableObjectArray& handler_types,
606 bool* needs_stack_trace); 615 bool* needs_stack_trace);
607 // Parse finally block and create an AST for it. 616 // Parse finally block and create an AST for it.
608 SequenceNode* ParseFinallyBlock(); 617 SequenceNode* ParseFinallyBlock(bool is_async,
618 LocalVariable* exception_var,
619 LocalVariable* stack_trace_var,
620 LocalVariable* rethrow_exception_var,
621 LocalVariable* rethrow_stack_trace_var);
609 // Adds try block to the list of try blocks seen so far. 622 // Adds try block to the list of try blocks seen so far.
610 void PushTryBlock(Block* try_block); 623 void PushTryBlock(Block* try_block);
611 // Pops the inner most try block from the list. 624 // Pops the inner most try block from the list.
612 TryBlocks* PopTryBlock(); 625 TryBlocks* PopTryBlock();
613 // 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.
614 void CheckAsyncOpInTryBlock(LocalScope** try_scope, 627 void CheckAsyncOpInTryBlock(LocalScope** try_scope,
615 int16_t* try_index, 628 int16_t* try_index,
616 LocalScope** outer_try_scope, 629 LocalScope** outer_try_scope,
617 int16_t* outer_try_index) const; 630 int16_t* outer_try_index) const;
618 // 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
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 853
841 // Indentation of parser trace. 854 // Indentation of parser trace.
842 intptr_t trace_indent_; 855 intptr_t trace_indent_;
843 856
844 DISALLOW_COPY_AND_ASSIGN(Parser); 857 DISALLOW_COPY_AND_ASSIGN(Parser);
845 }; 858 };
846 859
847 } // namespace dart 860 } // namespace dart
848 861
849 #endif // VM_PARSER_H_ 862 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698