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 24 matching lines...) Expand all Loading... |
35 V(ArgumentList) \ | 35 V(ArgumentList) \ |
36 V(Array) \ | 36 V(Array) \ |
37 V(Closure) \ | 37 V(Closure) \ |
38 V(InstanceCall) \ | 38 V(InstanceCall) \ |
39 V(StaticCall) \ | 39 V(StaticCall) \ |
40 V(ClosureCall) \ | 40 V(ClosureCall) \ |
41 V(CloneContext) \ | 41 V(CloneContext) \ |
42 V(ConstructorCall) \ | 42 V(ConstructorCall) \ |
43 V(InstanceGetter) \ | 43 V(InstanceGetter) \ |
44 V(InstanceSetter) \ | 44 V(InstanceSetter) \ |
| 45 V(InitStaticField) \ |
45 V(StaticGetter) \ | 46 V(StaticGetter) \ |
46 V(StaticSetter) \ | 47 V(StaticSetter) \ |
47 V(NativeBody) \ | 48 V(NativeBody) \ |
48 V(Primary) \ | 49 V(Primary) \ |
49 V(LoadLocal) \ | 50 V(LoadLocal) \ |
50 V(StoreLocal) \ | 51 V(StoreLocal) \ |
51 V(LoadInstanceField) \ | 52 V(LoadInstanceField) \ |
52 V(StoreInstanceField) \ | 53 V(StoreInstanceField) \ |
53 V(LoadStaticField) \ | 54 V(LoadStaticField) \ |
54 V(StoreStaticField) \ | 55 V(StoreStaticField) \ |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1385 |
1385 private: | 1386 private: |
1386 AstNode* receiver_; | 1387 AstNode* receiver_; |
1387 const String& field_name_; | 1388 const String& field_name_; |
1388 AstNode* value_; | 1389 AstNode* value_; |
1389 | 1390 |
1390 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceSetterNode); | 1391 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceSetterNode); |
1391 }; | 1392 }; |
1392 | 1393 |
1393 | 1394 |
| 1395 class InitStaticFieldNode : public AstNode { |
| 1396 public: |
| 1397 InitStaticFieldNode(intptr_t token_pos, const Field& field) |
| 1398 : AstNode(token_pos), field_(field) { |
| 1399 ASSERT(field_.IsZoneHandle()); |
| 1400 } |
| 1401 |
| 1402 const Field& field() const { return field_; } |
| 1403 |
| 1404 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| 1405 |
| 1406 DECLARE_COMMON_NODE_FUNCTIONS(InitStaticFieldNode); |
| 1407 |
| 1408 private: |
| 1409 const Field& field_; |
| 1410 |
| 1411 DISALLOW_COPY_AND_ASSIGN(InitStaticFieldNode); |
| 1412 }; |
| 1413 |
| 1414 |
1394 class StaticGetterNode : public AstNode { | 1415 class StaticGetterNode : public AstNode { |
1395 public: | 1416 public: |
1396 StaticGetterNode(intptr_t token_pos, | 1417 StaticGetterNode(intptr_t token_pos, |
1397 AstNode* receiver, | 1418 AstNode* receiver, |
1398 bool is_super_getter, | 1419 bool is_super_getter, |
1399 const Class& cls, | 1420 const Class& cls, |
1400 const String& field_name) | 1421 const String& field_name) |
1401 : AstNode(token_pos), | 1422 : AstNode(token_pos), |
1402 receiver_(receiver), | 1423 receiver_(receiver), |
1403 cls_(cls), | 1424 cls_(cls), |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 const intptr_t try_index_; | 1827 const intptr_t try_index_; |
1807 | 1828 |
1808 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1829 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
1809 }; | 1830 }; |
1810 | 1831 |
1811 } // namespace dart | 1832 } // namespace dart |
1812 | 1833 |
1813 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1834 #undef DECLARE_COMMON_NODE_FUNCTIONS |
1814 | 1835 |
1815 #endif // VM_AST_H_ | 1836 #endif // VM_AST_H_ |
OLD | NEW |