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

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

Issue 17873002: Remove an unused field in the AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 public: 1576 public:
1577 static const int kInvalidTryIndex = -1; 1577 static const int kInvalidTryIndex = -1;
1578 1578
1579 CatchClauseNode(intptr_t token_pos, 1579 CatchClauseNode(intptr_t token_pos,
1580 SequenceNode* catch_block, 1580 SequenceNode* catch_block,
1581 const Array& handler_types, 1581 const Array& handler_types,
1582 const LocalVariable* context_var, 1582 const LocalVariable* context_var,
1583 const LocalVariable* exception_var, 1583 const LocalVariable* exception_var,
1584 const LocalVariable* stacktrace_var) 1584 const LocalVariable* stacktrace_var)
1585 : AstNode(token_pos), 1585 : AstNode(token_pos),
1586 try_index_(kInvalidTryIndex),
1587 catch_block_(catch_block), 1586 catch_block_(catch_block),
1588 handler_types_(handler_types), 1587 handler_types_(handler_types),
1589 context_var_(*context_var), 1588 context_var_(*context_var),
1590 exception_var_(*exception_var), 1589 exception_var_(*exception_var),
1591 stacktrace_var_(*stacktrace_var) { 1590 stacktrace_var_(*stacktrace_var) {
1592 ASSERT(catch_block_ != NULL); 1591 ASSERT(catch_block_ != NULL);
1593 ASSERT(handler_types.IsZoneHandle()); 1592 ASSERT(handler_types.IsZoneHandle());
1594 ASSERT(context_var != NULL); 1593 ASSERT(context_var != NULL);
1595 ASSERT(exception_var != NULL); 1594 ASSERT(exception_var != NULL);
1596 ASSERT(stacktrace_var != NULL); 1595 ASSERT(stacktrace_var != NULL);
1597 } 1596 }
1598 1597
1599 int try_index() const {
1600 ASSERT(try_index_ >= 0);
1601 return try_index_;
1602 }
1603 void set_try_index(int value) { try_index_ = value; }
1604
1605 const Array& handler_types() const { return handler_types_; } 1598 const Array& handler_types() const { return handler_types_; }
1606 const LocalVariable& context_var() const { return context_var_; } 1599 const LocalVariable& context_var() const { return context_var_; }
1607 const LocalVariable& exception_var() const { return exception_var_; } 1600 const LocalVariable& exception_var() const { return exception_var_; }
1608 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } 1601 const LocalVariable& stacktrace_var() const { return stacktrace_var_; }
1609 1602
1610 virtual void VisitChildren(AstNodeVisitor* visitor) const { 1603 virtual void VisitChildren(AstNodeVisitor* visitor) const {
1611 catch_block_->Visit(visitor); 1604 catch_block_->Visit(visitor);
1612 } 1605 }
1613 1606
1614 DECLARE_COMMON_NODE_FUNCTIONS(CatchClauseNode); 1607 DECLARE_COMMON_NODE_FUNCTIONS(CatchClauseNode);
1615 1608
1616 private: 1609 private:
1617 int try_index_; // Running index of the try blocks seen in a function.
1618 SequenceNode* catch_block_; 1610 SequenceNode* catch_block_;
1619 const Array& handler_types_; 1611 const Array& handler_types_;
1620 const LocalVariable& context_var_; 1612 const LocalVariable& context_var_;
1621 const LocalVariable& exception_var_; 1613 const LocalVariable& exception_var_;
1622 const LocalVariable& stacktrace_var_; 1614 const LocalVariable& stacktrace_var_;
1623 1615
1624 DISALLOW_COPY_AND_ASSIGN(CatchClauseNode); 1616 DISALLOW_COPY_AND_ASSIGN(CatchClauseNode);
1625 }; 1617 };
1626 1618
1627 1619
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 const LocalVariable& context_var_; 1719 const LocalVariable& context_var_;
1728 1720
1729 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1721 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1730 }; 1722 };
1731 1723
1732 } // namespace dart 1724 } // namespace dart
1733 1725
1734 #undef DECLARE_COMMON_NODE_FUNCTIONS 1726 #undef DECLARE_COMMON_NODE_FUNCTIONS
1735 1727
1736 #endif // VM_AST_H_ 1728 #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