| 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 16 matching lines...) Expand all Loading... |
| 27 V(Comparison) \ | 27 V(Comparison) \ |
| 28 V(UnaryOp) \ | 28 V(UnaryOp) \ |
| 29 V(ConditionalExpr) \ | 29 V(ConditionalExpr) \ |
| 30 V(If) \ | 30 V(If) \ |
| 31 V(Switch) \ | 31 V(Switch) \ |
| 32 V(Case) \ | 32 V(Case) \ |
| 33 V(While) \ | 33 V(While) \ |
| 34 V(DoWhile) \ | 34 V(DoWhile) \ |
| 35 V(For) \ | 35 V(For) \ |
| 36 V(Jump) \ | 36 V(Jump) \ |
| 37 V(Stop) \ |
| 37 V(ArgumentList) \ | 38 V(ArgumentList) \ |
| 38 V(Array) \ | 39 V(Array) \ |
| 39 V(Closure) \ | 40 V(Closure) \ |
| 40 V(InstanceCall) \ | 41 V(InstanceCall) \ |
| 41 V(StaticCall) \ | 42 V(StaticCall) \ |
| 42 V(ClosureCall) \ | 43 V(ClosureCall) \ |
| 43 V(CloneContext) \ | 44 V(CloneContext) \ |
| 44 V(ConstructorCall) \ | 45 V(ConstructorCall) \ |
| 45 V(InstanceGetter) \ | 46 V(InstanceGetter) \ |
| 46 V(InstanceSetter) \ | 47 V(InstanceSetter) \ |
| (...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 | 1137 |
| 1137 private: | 1138 private: |
| 1138 Token::Kind kind_; | 1139 Token::Kind kind_; |
| 1139 SourceLabel* label_; | 1140 SourceLabel* label_; |
| 1140 GrowableArray<InlinedFinallyNode*> inlined_finally_list_; | 1141 GrowableArray<InlinedFinallyNode*> inlined_finally_list_; |
| 1141 | 1142 |
| 1142 DISALLOW_IMPLICIT_CONSTRUCTORS(JumpNode); | 1143 DISALLOW_IMPLICIT_CONSTRUCTORS(JumpNode); |
| 1143 }; | 1144 }; |
| 1144 | 1145 |
| 1145 | 1146 |
| 1147 class StopNode : public AstNode { |
| 1148 public: |
| 1149 StopNode(intptr_t token_pos, const char* message) |
| 1150 : AstNode(token_pos), |
| 1151 message_(message) { |
| 1152 ASSERT(message != NULL); |
| 1153 } |
| 1154 |
| 1155 const char* message() const { return message_; } |
| 1156 |
| 1157 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| 1158 |
| 1159 DECLARE_COMMON_NODE_FUNCTIONS(StopNode); |
| 1160 |
| 1161 private: |
| 1162 const char* message_; |
| 1163 |
| 1164 DISALLOW_IMPLICIT_CONSTRUCTORS(StopNode); |
| 1165 }; |
| 1166 |
| 1167 |
| 1146 class LoadLocalNode : public AstNode { | 1168 class LoadLocalNode : public AstNode { |
| 1147 public: | 1169 public: |
| 1148 LoadLocalNode(intptr_t token_pos, const LocalVariable* local) | 1170 LoadLocalNode(intptr_t token_pos, const LocalVariable* local) |
| 1149 : AstNode(token_pos), local_(*local) { | 1171 : AstNode(token_pos), local_(*local) { |
| 1150 ASSERT(local != NULL); | 1172 ASSERT(local != NULL); |
| 1151 } | 1173 } |
| 1152 | 1174 |
| 1153 const LocalVariable& local() const { return local_; } | 1175 const LocalVariable& local() const { return local_; } |
| 1154 | 1176 |
| 1155 virtual void VisitChildren(AstNodeVisitor* visitor) const { } | 1177 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1940 const intptr_t try_index_; | 1962 const intptr_t try_index_; |
| 1941 | 1963 |
| 1942 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1964 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1943 }; | 1965 }; |
| 1944 | 1966 |
| 1945 } // namespace dart | 1967 } // namespace dart |
| 1946 | 1968 |
| 1947 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1969 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1948 | 1970 |
| 1949 #endif // VM_AST_H_ | 1971 #endif // VM_AST_H_ |
| OLD | NEW |