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

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

Issue 973103002: One more fix to async machinery (rethrow in finally, issue 22595). (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/flow_graph_builder.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_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 class CatchClauseNode : public AstNode { 1778 class CatchClauseNode : public AstNode {
1779 public: 1779 public:
1780 static const intptr_t kInvalidTryIndex = -1; 1780 static const intptr_t kInvalidTryIndex = -1;
1781 1781
1782 CatchClauseNode(intptr_t token_pos, 1782 CatchClauseNode(intptr_t token_pos,
1783 SequenceNode* catch_block, 1783 SequenceNode* catch_block,
1784 const Array& handler_types, 1784 const Array& handler_types,
1785 const LocalVariable* context_var, 1785 const LocalVariable* context_var,
1786 const LocalVariable* exception_var, 1786 const LocalVariable* exception_var,
1787 const LocalVariable* stacktrace_var, 1787 const LocalVariable* stacktrace_var,
1788 const LocalVariable* rethrow_exception_var,
1789 const LocalVariable* rethrow_stacktrace_var,
1788 intptr_t catch_handler_index, 1790 intptr_t catch_handler_index,
1789 bool needs_stacktrace) 1791 bool needs_stacktrace)
1790 : AstNode(token_pos), 1792 : AstNode(token_pos),
1791 catch_block_(catch_block), 1793 catch_block_(catch_block),
1792 handler_types_(handler_types), 1794 handler_types_(handler_types),
1793 context_var_(*context_var), 1795 context_var_(*context_var),
1794 exception_var_(*exception_var), 1796 exception_var_(*exception_var),
1795 stacktrace_var_(*stacktrace_var), 1797 stacktrace_var_(*stacktrace_var),
1798 rethrow_exception_var_(*rethrow_exception_var),
1799 rethrow_stacktrace_var_(*rethrow_stacktrace_var),
1796 catch_handler_index_(catch_handler_index), 1800 catch_handler_index_(catch_handler_index),
1797 needs_stacktrace_(needs_stacktrace) { 1801 needs_stacktrace_(needs_stacktrace) {
1798 ASSERT(catch_block_ != NULL); 1802 ASSERT(catch_block_ != NULL);
1799 ASSERT(handler_types.IsZoneHandle()); 1803 ASSERT(handler_types.IsZoneHandle());
1800 ASSERT(context_var != NULL); 1804 ASSERT(context_var != NULL);
1801 ASSERT(exception_var != NULL); 1805 ASSERT(exception_var != NULL);
1802 ASSERT(stacktrace_var != NULL); 1806 ASSERT(stacktrace_var != NULL);
1803 } 1807 }
1804 1808
1805 const Array& handler_types() const { return handler_types_; } 1809 const Array& handler_types() const { return handler_types_; }
1806 const LocalVariable& context_var() const { return context_var_; } 1810 const LocalVariable& context_var() const { return context_var_; }
1807 const LocalVariable& exception_var() const { return exception_var_; } 1811 const LocalVariable& exception_var() const { return exception_var_; }
1808 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } 1812 const LocalVariable& stacktrace_var() const { return stacktrace_var_; }
1813 const LocalVariable& rethrow_exception_var() const {
1814 return rethrow_exception_var_;
1815 }
1816 const LocalVariable& rethrow_stacktrace_var() const {
1817 return rethrow_stacktrace_var_;
1818 }
1809 intptr_t catch_handler_index() const { return catch_handler_index_; } 1819 intptr_t catch_handler_index() const { return catch_handler_index_; }
1810 bool needs_stacktrace() const { return needs_stacktrace_; } 1820 bool needs_stacktrace() const { return needs_stacktrace_; }
1811 1821
1812 virtual void VisitChildren(AstNodeVisitor* visitor) const { 1822 virtual void VisitChildren(AstNodeVisitor* visitor) const {
1813 catch_block_->Visit(visitor); 1823 catch_block_->Visit(visitor);
1814 } 1824 }
1815 1825
1816 DECLARE_COMMON_NODE_FUNCTIONS(CatchClauseNode); 1826 DECLARE_COMMON_NODE_FUNCTIONS(CatchClauseNode);
1817 1827
1818 private: 1828 private:
1819 SequenceNode* catch_block_; 1829 SequenceNode* catch_block_;
1820 const Array& handler_types_; 1830 const Array& handler_types_;
1821 const LocalVariable& context_var_; 1831 const LocalVariable& context_var_;
1822 const LocalVariable& exception_var_; 1832 const LocalVariable& exception_var_;
1823 const LocalVariable& stacktrace_var_; 1833 const LocalVariable& stacktrace_var_;
1834 const LocalVariable& rethrow_exception_var_;
1835 const LocalVariable& rethrow_stacktrace_var_;
1824 const intptr_t catch_handler_index_; 1836 const intptr_t catch_handler_index_;
1825 const bool needs_stacktrace_; 1837 const bool needs_stacktrace_;
1826 1838
1827 DISALLOW_COPY_AND_ASSIGN(CatchClauseNode); 1839 DISALLOW_COPY_AND_ASSIGN(CatchClauseNode);
1828 }; 1840 };
1829 1841
1830 1842
1831 class TryCatchNode : public AstNode { 1843 class TryCatchNode : public AstNode {
1832 public: 1844 public:
1833 TryCatchNode(intptr_t token_pos, 1845 TryCatchNode(intptr_t token_pos,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 const intptr_t try_index_; 1945 const intptr_t try_index_;
1934 1946
1935 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1947 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1936 }; 1948 };
1937 1949
1938 } // namespace dart 1950 } // namespace dart
1939 1951
1940 #undef DECLARE_COMMON_NODE_FUNCTIONS 1952 #undef DECLARE_COMMON_NODE_FUNCTIONS
1941 1953
1942 #endif // VM_AST_H_ 1954 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698