| 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 : AstNode(token_pos), field_(field) { | 1108 : AstNode(token_pos), field_(field) { |
| 1109 ASSERT(field_.IsZoneHandle()); | 1109 ASSERT(field_.IsZoneHandle()); |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 const Field& field() const { return field_; } | 1112 const Field& field() const { return field_; } |
| 1113 | 1113 |
| 1114 virtual void VisitChildren(AstNodeVisitor* visitor) const { } | 1114 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| 1115 | 1115 |
| 1116 virtual AstNode* MakeAssignmentNode(AstNode* rhs); | 1116 virtual AstNode* MakeAssignmentNode(AstNode* rhs); |
| 1117 | 1117 |
| 1118 virtual bool IsPotentiallyConst() const { |
| 1119 return field_.is_const(); |
| 1120 } |
| 1121 |
| 1118 virtual const Instance* EvalConstExpr() const { | 1122 virtual const Instance* EvalConstExpr() const { |
| 1119 ASSERT(field_.is_static()); | 1123 ASSERT(field_.is_static()); |
| 1120 return field_.is_const() ? &Instance::ZoneHandle(field_.value()) : NULL; | 1124 return field_.is_const() ? &Instance::ZoneHandle(field_.value()) : NULL; |
| 1121 } | 1125 } |
| 1122 | 1126 |
| 1123 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode); | 1127 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode); |
| 1124 | 1128 |
| 1125 private: | 1129 private: |
| 1126 const Field& field_; | 1130 const Field& field_; |
| 1127 | 1131 |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 const intptr_t try_index_; | 1757 const intptr_t try_index_; |
| 1754 | 1758 |
| 1755 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1759 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1756 }; | 1760 }; |
| 1757 | 1761 |
| 1758 } // namespace dart | 1762 } // namespace dart |
| 1759 | 1763 |
| 1760 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1764 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1761 | 1765 |
| 1762 #endif // VM_AST_H_ | 1766 #endif // VM_AST_H_ |
| OLD | NEW |