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" |
(...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2528 DEFINE_CASTING_OPERATIONS(Name); | 2528 DEFINE_CASTING_OPERATIONS(Name); |
2529 | 2529 |
2530 virtual void AcceptVisitor(Visitor* visitor); | 2530 virtual void AcceptVisitor(Visitor* visitor); |
2531 virtual void VisitChildren(Visitor* visitor); | 2531 virtual void VisitChildren(Visitor* visitor); |
2532 | 2532 |
2533 String* string() { return string_; } | 2533 String* string() { return string_; } |
2534 Library* library() { | 2534 Library* library() { |
2535 if (library_reference_ == NULL) return NULL; | 2535 if (library_reference_ == NULL) return NULL; |
2536 return library_reference_->AsLibrary(); | 2536 return library_reference_->AsLibrary(); |
2537 } | 2537 } |
2538 CanonicalName* library_reference() { return library_reference_; } | |
2539 | 2538 |
2540 private: | 2539 private: |
2541 Name(String* string, CanonicalName* library_reference) | 2540 Name(String* string, CanonicalName* library_reference) |
2542 : string_(string), library_reference_(library_reference) {} // NOLINT | 2541 : string_(string), library_reference_(library_reference) {} // NOLINT |
2543 | 2542 |
2544 Ref<String> string_; | 2543 Ref<String> string_; |
2545 Ref<CanonicalName> library_reference_; | 2544 Ref<CanonicalName> library_reference_; |
2546 | 2545 |
2547 DISALLOW_COPY_AND_ASSIGN(Name); | 2546 DISALLOW_COPY_AND_ASSIGN(Name); |
2548 }; | 2547 }; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2672 | 2671 |
2673 DISALLOW_COPY_AND_ASSIGN(VoidType); | 2672 DISALLOW_COPY_AND_ASSIGN(VoidType); |
2674 }; | 2673 }; |
2675 | 2674 |
2676 | 2675 |
2677 class InterfaceType : public DartType { | 2676 class InterfaceType : public DartType { |
2678 public: | 2677 public: |
2679 static InterfaceType* ReadFrom(Reader* reader); | 2678 static InterfaceType* ReadFrom(Reader* reader); |
2680 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); | 2679 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); |
2681 | 2680 |
2682 explicit InterfaceType(CanonicalName* class_reference) | 2681 explicit InterfaceType(CanonicalName* klass_reference) |
2683 : class_reference_(class_reference) {} | 2682 : klass_reference_(klass_reference) {} |
2684 virtual ~InterfaceType(); | 2683 virtual ~InterfaceType(); |
2685 | 2684 |
2686 DEFINE_CASTING_OPERATIONS(InterfaceType); | 2685 DEFINE_CASTING_OPERATIONS(InterfaceType); |
2687 | 2686 |
2688 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); | 2687 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); |
2689 virtual void VisitChildren(Visitor* visitor); | 2688 virtual void VisitChildren(Visitor* visitor); |
2690 | 2689 |
2691 Class* klass() { return class_reference_->AsClass(); } | 2690 Class* klass() { return klass_reference_->AsClass(); } |
2692 CanonicalName* class_reference() { return class_reference_; } | |
2693 List<DartType>& type_arguments() { return type_arguments_; } | 2691 List<DartType>& type_arguments() { return type_arguments_; } |
2694 | 2692 |
2695 private: | 2693 private: |
2696 InterfaceType() {} | 2694 InterfaceType() {} |
2697 | 2695 |
2698 Ref<CanonicalName> class_reference_; | 2696 Ref<CanonicalName> klass_reference_; |
2699 List<DartType> type_arguments_; | 2697 List<DartType> type_arguments_; |
2700 | 2698 |
2701 DISALLOW_COPY_AND_ASSIGN(InterfaceType); | 2699 DISALLOW_COPY_AND_ASSIGN(InterfaceType); |
2702 }; | 2700 }; |
2703 | 2701 |
2704 | 2702 |
2705 class FunctionType : public DartType { | 2703 class FunctionType : public DartType { |
2706 public: | 2704 public: |
2707 static FunctionType* ReadFrom(Reader* reader); | 2705 static FunctionType* ReadFrom(Reader* reader); |
2708 static FunctionType* ReadFrom(Reader* reader, bool _without_type_arguments_); | 2706 static FunctionType* ReadFrom(Reader* reader, bool _without_type_arguments_); |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3245 | 3243 |
3246 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3244 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
3247 intptr_t buffer_length); | 3245 intptr_t buffer_length); |
3248 | 3246 |
3249 | 3247 |
3250 | 3248 |
3251 } // namespace dart | 3249 } // namespace dart |
3252 | 3250 |
3253 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3251 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
3254 #endif // RUNTIME_VM_KERNEL_H_ | 3252 #endif // RUNTIME_VM_KERNEL_H_ |
OLD | NEW |