| 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_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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 692 |
| 693 void set_true_expr(AstNode* true_expr) { | 693 void set_true_expr(AstNode* true_expr) { |
| 694 ASSERT(true_expr != NULL); | 694 ASSERT(true_expr != NULL); |
| 695 true_expr_ = true_expr; | 695 true_expr_ = true_expr; |
| 696 } | 696 } |
| 697 void set_false_expr(AstNode* false_expr) { | 697 void set_false_expr(AstNode* false_expr) { |
| 698 ASSERT(false_expr != NULL); | 698 ASSERT(false_expr != NULL); |
| 699 false_expr_ = false_expr; | 699 false_expr_ = false_expr; |
| 700 } | 700 } |
| 701 | 701 |
| 702 virtual bool IsPotentiallyConst() const; |
| 703 virtual const Instance* EvalConstExpr() const; |
| 704 |
| 702 virtual void VisitChildren(AstNodeVisitor* visitor) const { | 705 virtual void VisitChildren(AstNodeVisitor* visitor) const { |
| 703 condition()->Visit(visitor); | 706 condition()->Visit(visitor); |
| 704 true_expr()->Visit(visitor); | 707 true_expr()->Visit(visitor); |
| 705 false_expr()->Visit(visitor); | 708 false_expr()->Visit(visitor); |
| 706 } | 709 } |
| 707 | 710 |
| 708 DECLARE_COMMON_NODE_FUNCTIONS(ConditionalExprNode); | 711 DECLARE_COMMON_NODE_FUNCTIONS(ConditionalExprNode); |
| 709 | 712 |
| 710 private: | 713 private: |
| 711 AstNode* condition_; | 714 AstNode* condition_; |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 const intptr_t try_index_; | 1753 const intptr_t try_index_; |
| 1751 | 1754 |
| 1752 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1755 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1753 }; | 1756 }; |
| 1754 | 1757 |
| 1755 } // namespace dart | 1758 } // namespace dart |
| 1756 | 1759 |
| 1757 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1760 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1758 | 1761 |
| 1759 #endif // VM_AST_H_ | 1762 #endif // VM_AST_H_ |
| OLD | NEW |