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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 5858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5869 class MirrorReference : public Instance { | 5869 class MirrorReference : public Instance { |
5870 public: | 5870 public: |
5871 RawObject* referent() const { | 5871 RawObject* referent() const { |
5872 return raw_ptr()->referent_; | 5872 return raw_ptr()->referent_; |
5873 } | 5873 } |
5874 | 5874 |
5875 void set_referent(const Object& referent) const { | 5875 void set_referent(const Object& referent) const { |
5876 StorePointer(&raw_ptr()->referent_, referent.raw()); | 5876 StorePointer(&raw_ptr()->referent_, referent.raw()); |
5877 } | 5877 } |
5878 | 5878 |
| 5879 RawClass* GetClassReferent() const; |
| 5880 |
5879 RawFunction* GetFunctionReferent() const; | 5881 RawFunction* GetFunctionReferent() const; |
5880 | 5882 |
| 5883 RawLibrary* GetLibraryReferent() const; |
| 5884 |
5881 static RawMirrorReference* New(Heap::Space space = Heap::kNew); | 5885 static RawMirrorReference* New(Heap::Space space = Heap::kNew); |
5882 | 5886 |
5883 static intptr_t InstanceSize() { | 5887 static intptr_t InstanceSize() { |
5884 return RoundedAllocationSize(sizeof(RawMirrorReference)); | 5888 return RoundedAllocationSize(sizeof(RawMirrorReference)); |
5885 } | 5889 } |
5886 | 5890 |
5887 private: | 5891 private: |
5888 FINAL_HEAP_OBJECT_IMPLEMENTATION(MirrorReference, Instance); | 5892 FINAL_HEAP_OBJECT_IMPLEMENTATION(MirrorReference, Instance); |
5889 friend class Class; | 5893 friend class Class; |
5890 }; | 5894 }; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6009 | 6013 |
6010 | 6014 |
6011 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6015 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6012 intptr_t index) { | 6016 intptr_t index) { |
6013 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6017 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6014 } | 6018 } |
6015 | 6019 |
6016 } // namespace dart | 6020 } // namespace dart |
6017 | 6021 |
6018 #endif // VM_OBJECT_H_ | 6022 #endif // VM_OBJECT_H_ |
OLD | NEW |