Chromium Code Reviews| 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 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2527 | 2527 |
| 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 } |
|
kustermann
2017/03/23 10:43:18
As a safeguard, I think we should get rid of these
Kevin Millikin (Google)
2017/03/23 11:15:52
I agree.
I plan to get rid of the definition from
| |
| 2538 CanonicalName* library_reference() { return library_reference_; } | |
| 2538 | 2539 |
| 2539 private: | 2540 private: |
| 2540 Name(String* string, CanonicalName* library_reference) | 2541 Name(String* string, CanonicalName* library_reference) |
| 2541 : string_(string), library_reference_(library_reference) {} // NOLINT | 2542 : string_(string), library_reference_(library_reference) {} // NOLINT |
| 2542 | 2543 |
| 2543 Ref<String> string_; | 2544 Ref<String> string_; |
| 2544 Ref<CanonicalName> library_reference_; | 2545 Ref<CanonicalName> library_reference_; |
| 2545 | 2546 |
| 2546 DISALLOW_COPY_AND_ASSIGN(Name); | 2547 DISALLOW_COPY_AND_ASSIGN(Name); |
| 2547 }; | 2548 }; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2671 | 2672 |
| 2672 DISALLOW_COPY_AND_ASSIGN(VoidType); | 2673 DISALLOW_COPY_AND_ASSIGN(VoidType); |
| 2673 }; | 2674 }; |
| 2674 | 2675 |
| 2675 | 2676 |
| 2676 class InterfaceType : public DartType { | 2677 class InterfaceType : public DartType { |
| 2677 public: | 2678 public: |
| 2678 static InterfaceType* ReadFrom(Reader* reader); | 2679 static InterfaceType* ReadFrom(Reader* reader); |
| 2679 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); | 2680 static InterfaceType* ReadFrom(Reader* reader, bool _without_type_arguments_); |
| 2680 | 2681 |
| 2681 explicit InterfaceType(CanonicalName* klass_reference) | 2682 explicit InterfaceType(CanonicalName* class_reference) |
| 2682 : klass_reference_(klass_reference) {} | 2683 : class_reference_(class_reference) {} |
| 2683 virtual ~InterfaceType(); | 2684 virtual ~InterfaceType(); |
| 2684 | 2685 |
| 2685 DEFINE_CASTING_OPERATIONS(InterfaceType); | 2686 DEFINE_CASTING_OPERATIONS(InterfaceType); |
| 2686 | 2687 |
| 2687 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); | 2688 virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor); |
| 2688 virtual void VisitChildren(Visitor* visitor); | 2689 virtual void VisitChildren(Visitor* visitor); |
| 2689 | 2690 |
| 2690 Class* klass() { return klass_reference_->AsClass(); } | 2691 Class* klass() { return class_reference_->AsClass(); } |
| 2692 CanonicalName* class_reference() { return class_reference_; } | |
| 2691 List<DartType>& type_arguments() { return type_arguments_; } | 2693 List<DartType>& type_arguments() { return type_arguments_; } |
| 2692 | 2694 |
| 2693 private: | 2695 private: |
| 2694 InterfaceType() {} | 2696 InterfaceType() {} |
| 2695 | 2697 |
| 2696 Ref<CanonicalName> klass_reference_; | 2698 Ref<CanonicalName> class_reference_; |
| 2697 List<DartType> type_arguments_; | 2699 List<DartType> type_arguments_; |
| 2698 | 2700 |
| 2699 DISALLOW_COPY_AND_ASSIGN(InterfaceType); | 2701 DISALLOW_COPY_AND_ASSIGN(InterfaceType); |
| 2700 }; | 2702 }; |
| 2701 | 2703 |
| 2702 | 2704 |
| 2703 class FunctionType : public DartType { | 2705 class FunctionType : public DartType { |
| 2704 public: | 2706 public: |
| 2705 static FunctionType* ReadFrom(Reader* reader); | 2707 static FunctionType* ReadFrom(Reader* reader); |
| 2706 static FunctionType* ReadFrom(Reader* reader, bool _without_type_arguments_); | 2708 static FunctionType* ReadFrom(Reader* reader, bool _without_type_arguments_); |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3243 | 3245 |
| 3244 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3246 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 3245 intptr_t buffer_length); | 3247 intptr_t buffer_length); |
| 3246 | 3248 |
| 3247 | 3249 |
| 3248 | 3250 |
| 3249 } // namespace dart | 3251 } // namespace dart |
| 3250 | 3252 |
| 3251 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3253 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 3252 #endif // RUNTIME_VM_KERNEL_H_ | 3254 #endif // RUNTIME_VM_KERNEL_H_ |
| OLD | NEW |