| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 V(WhileNode, "while") \ | 35 V(WhileNode, "while") \ |
| 36 V(DoWhileNode, "dowhile") \ | 36 V(DoWhileNode, "dowhile") \ |
| 37 V(ForNode, "for") \ | 37 V(ForNode, "for") \ |
| 38 V(JumpNode, "jump") \ | 38 V(JumpNode, "jump") \ |
| 39 V(ArgumentListNode, "args") \ | 39 V(ArgumentListNode, "args") \ |
| 40 V(ArrayNode, "array") \ | 40 V(ArrayNode, "array") \ |
| 41 V(ClosureNode, "closure") \ | 41 V(ClosureNode, "closure") \ |
| 42 V(InstanceCallNode, "instance call") \ | 42 V(InstanceCallNode, "instance call") \ |
| 43 V(StaticCallNode, "static call") \ | 43 V(StaticCallNode, "static call") \ |
| 44 V(ClosureCallNode, "closure call") \ | 44 V(ClosureCallNode, "closure call") \ |
| 45 V(CloneContextNode, "clone context") \ |
| 45 V(ConstructorCallNode, "constructor call") \ | 46 V(ConstructorCallNode, "constructor call") \ |
| 46 V(InstanceGetterNode, "instance getter call") \ | 47 V(InstanceGetterNode, "instance getter call") \ |
| 47 V(InstanceSetterNode, "instance setter call") \ | 48 V(InstanceSetterNode, "instance setter call") \ |
| 48 V(StaticGetterNode, "static getter") \ | 49 V(StaticGetterNode, "static getter") \ |
| 49 V(StaticSetterNode, "static setter") \ | 50 V(StaticSetterNode, "static setter") \ |
| 50 V(NativeBodyNode, "native body") \ | 51 V(NativeBodyNode, "native body") \ |
| 51 V(PrimaryNode, "primary") \ | 52 V(PrimaryNode, "primary") \ |
| 52 V(LoadLocalNode, "load local") \ | 53 V(LoadLocalNode, "load local") \ |
| 53 V(StoreLocalNode, "store local") \ | 54 V(StoreLocalNode, "store local") \ |
| 54 V(LoadInstanceFieldNode, "load field") \ | 55 V(LoadInstanceFieldNode, "load field") \ |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 227 |
| 227 private: | 228 private: |
| 228 LocalScope* scope_; | 229 LocalScope* scope_; |
| 229 GrowableArray<AstNode*> nodes_; | 230 GrowableArray<AstNode*> nodes_; |
| 230 SourceLabel* label_; | 231 SourceLabel* label_; |
| 231 | 232 |
| 232 DISALLOW_COPY_AND_ASSIGN(SequenceNode); | 233 DISALLOW_COPY_AND_ASSIGN(SequenceNode); |
| 233 }; | 234 }; |
| 234 | 235 |
| 235 | 236 |
| 237 class CloneContextNode : public AstNode { |
| 238 public: |
| 239 explicit CloneContextNode(intptr_t token_index) |
| 240 : AstNode(token_index) { |
| 241 } |
| 242 |
| 243 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| 244 |
| 245 DECLARE_COMMON_NODE_FUNCTIONS(CloneContextNode); |
| 246 |
| 247 private: |
| 248 DISALLOW_COPY_AND_ASSIGN(CloneContextNode); |
| 249 }; |
| 250 |
| 251 |
| 236 class ArgumentListNode : public AstNode { | 252 class ArgumentListNode : public AstNode { |
| 237 public: | 253 public: |
| 238 explicit ArgumentListNode(intptr_t token_index) | 254 explicit ArgumentListNode(intptr_t token_index) |
| 239 : AstNode(token_index), | 255 : AstNode(token_index), |
| 240 nodes_(4), | 256 nodes_(4), |
| 241 names_(Array::ZoneHandle()) { | 257 names_(Array::ZoneHandle()) { |
| 242 } | 258 } |
| 243 | 259 |
| 244 void VisitChildren(AstNodeVisitor* visitor) const; | 260 void VisitChildren(AstNodeVisitor* visitor) const; |
| 245 | 261 |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1866 const LocalVariable& context_var_; | 1882 const LocalVariable& context_var_; |
| 1867 | 1883 |
| 1868 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1884 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1869 }; | 1885 }; |
| 1870 | 1886 |
| 1871 } // namespace dart | 1887 } // namespace dart |
| 1872 | 1888 |
| 1873 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1889 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1874 | 1890 |
| 1875 #endif // VM_AST_H_ | 1891 #endif // VM_AST_H_ |
| OLD | NEW |