| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 RUNTIME_VM_KERNEL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_H_ |
| 6 #define RUNTIME_VM_KERNEL_H_ | 6 #define RUNTIME_VM_KERNEL_H_ |
| 7 | 7 |
| 8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| 11 #include "vm/globals.h" | 11 #include "vm/globals.h" |
| 12 #include "vm/growable_array.h" | 12 #include "vm/growable_array.h" |
| 13 #include "vm/token_position.h" | 13 #include "vm/token_position.h" |
| 14 | 14 |
| 15 | 15 |
| 16 #define KERNEL_NODES_DO(M) \ | 16 #define KERNEL_NODES_DO(M) \ |
| 17 M(Name) \ | 17 M(Name) \ |
| 18 M(DartType) \ | 18 M(DartType) \ |
| 19 M(InvalidType) \ | 19 M(InvalidType) \ |
| 20 M(DynamicType) \ | 20 M(DynamicType) \ |
| 21 M(VoidType) \ | 21 M(VoidType) \ |
| 22 M(BottomType) \ |
| 22 M(InterfaceType) \ | 23 M(InterfaceType) \ |
| 23 M(FunctionType) \ | 24 M(FunctionType) \ |
| 24 M(TypeParameterType) \ | 25 M(TypeParameterType) \ |
| 25 M(VectorType) \ | 26 M(VectorType) \ |
| 26 M(TypedefType) | 27 M(TypedefType) |
| 27 | 28 |
| 28 #define KERNEL_TREE_NODES_DO(M) \ | 29 #define KERNEL_TREE_NODES_DO(M) \ |
| 29 M(Library) \ | 30 M(Library) \ |
| 30 M(Typedef) \ | 31 M(Typedef) \ |
| 31 M(Class) \ | 32 M(Class) \ |
| (...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2674 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); | 2675 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); |
| 2675 virtual void VisitChildren(Visitor* visitor); | 2676 virtual void VisitChildren(Visitor* visitor); |
| 2676 | 2677 |
| 2677 private: | 2678 private: |
| 2678 VoidType() {} | 2679 VoidType() {} |
| 2679 | 2680 |
| 2680 DISALLOW_COPY_AND_ASSIGN(VoidType); | 2681 DISALLOW_COPY_AND_ASSIGN(VoidType); |
| 2681 }; | 2682 }; |
| 2682 | 2683 |
| 2683 | 2684 |
| 2685 class BottomType : public DartType { |
| 2686 public: |
| 2687 static BottomType* ReadFrom(Reader* reader); |
| 2688 |
| 2689 virtual ~BottomType(); |
| 2690 |
| 2691 DEFINE_CASTING_OPERATIONS(BottomType); |
| 2692 |
| 2693 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); |
| 2694 virtual void VisitChildren(Visitor* visitor); |
| 2695 |
| 2696 private: |
| 2697 BottomType() {} |
| 2698 |
| 2699 DISALLOW_COPY_AND_ASSIGN(BottomType); |
| 2700 }; |
| 2701 |
| 2702 |
| 2684 class InterfaceType : public DartType { | 2703 class InterfaceType : public DartType { |
| 2685 public: | 2704 public: |
| 2686 static InterfaceType* ReadFrom(Reader* reader); | 2705 static InterfaceType* ReadFrom(Reader* reader); |
| 2687 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); | 2706 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); |
| 2688 | 2707 |
| 2689 explicit InterfaceType(intptr_t class_reference) | 2708 explicit InterfaceType(intptr_t class_reference) |
| 2690 : class_reference_(class_reference) {} | 2709 : class_reference_(class_reference) {} |
| 2691 virtual ~InterfaceType(); | 2710 virtual ~InterfaceType(); |
| 2692 | 2711 |
| 2693 DEFINE_CASTING_OPERATIONS(InterfaceType); | 2712 DEFINE_CASTING_OPERATIONS(InterfaceType); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3126 virtual ~DartTypeVisitor() {} | 3145 virtual ~DartTypeVisitor() {} |
| 3127 | 3146 |
| 3128 virtual void VisitDefaultDartType(DartType* node) = 0; | 3147 virtual void VisitDefaultDartType(DartType* node) = 0; |
| 3129 virtual void VisitInvalidType(InvalidType* node) { | 3148 virtual void VisitInvalidType(InvalidType* node) { |
| 3130 VisitDefaultDartType(node); | 3149 VisitDefaultDartType(node); |
| 3131 } | 3150 } |
| 3132 virtual void VisitDynamicType(DynamicType* node) { | 3151 virtual void VisitDynamicType(DynamicType* node) { |
| 3133 VisitDefaultDartType(node); | 3152 VisitDefaultDartType(node); |
| 3134 } | 3153 } |
| 3135 virtual void VisitVoidType(VoidType* node) { VisitDefaultDartType(node); } | 3154 virtual void VisitVoidType(VoidType* node) { VisitDefaultDartType(node); } |
| 3155 virtual void VisitBottomType(BottomType* node) { VisitDefaultDartType(node); } |
| 3136 virtual void VisitInterfaceType(InterfaceType* node) { | 3156 virtual void VisitInterfaceType(InterfaceType* node) { |
| 3137 VisitDefaultDartType(node); | 3157 VisitDefaultDartType(node); |
| 3138 } | 3158 } |
| 3139 virtual void VisitFunctionType(FunctionType* node) { | 3159 virtual void VisitFunctionType(FunctionType* node) { |
| 3140 VisitDefaultDartType(node); | 3160 VisitDefaultDartType(node); |
| 3141 } | 3161 } |
| 3142 virtual void VisitTypeParameterType(TypeParameterType* node) { | 3162 virtual void VisitTypeParameterType(TypeParameterType* node) { |
| 3143 VisitDefaultDartType(node); | 3163 VisitDefaultDartType(node); |
| 3144 } | 3164 } |
| 3145 virtual void VisitVectorType(VectorType* node) { VisitDefaultDartType(node); } | 3165 virtual void VisitVectorType(VectorType* node) { VisitDefaultDartType(node); } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3289 } // namespace kernel | 3309 } // namespace kernel |
| 3290 | 3310 |
| 3291 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3311 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 3292 intptr_t buffer_length); | 3312 intptr_t buffer_length); |
| 3293 | 3313 |
| 3294 | 3314 |
| 3295 } // namespace dart | 3315 } // namespace dart |
| 3296 | 3316 |
| 3297 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3317 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 3298 #endif // RUNTIME_VM_KERNEL_H_ | 3318 #endif // RUNTIME_VM_KERNEL_H_ |
| OLD | NEW |