Chromium Code Reviews| 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 static RawFunction* GetFunctionReferent(RawObject* raw_ptr); | |
|
siva
2013/07/19 21:01:40
why not make this an instance method:
RawFunction
Michael Lippautz (Google)
2013/07/19 22:13:20
Changed to an instance method. The other ones will
| |
| 5880 | |
| 5879 static RawMirrorReference* New(Heap::Space space = Heap::kNew); | 5881 static RawMirrorReference* New(Heap::Space space = Heap::kNew); |
| 5880 | 5882 |
| 5881 static intptr_t InstanceSize() { | 5883 static intptr_t InstanceSize() { |
| 5882 return RoundedAllocationSize(sizeof(RawMirrorReference)); | 5884 return RoundedAllocationSize(sizeof(RawMirrorReference)); |
| 5883 } | 5885 } |
| 5884 | 5886 |
| 5885 private: | 5887 private: |
| 5886 FINAL_HEAP_OBJECT_IMPLEMENTATION(MirrorReference, Instance); | 5888 FINAL_HEAP_OBJECT_IMPLEMENTATION(MirrorReference, Instance); |
| 5887 friend class Class; | 5889 friend class Class; |
| 5888 }; | 5890 }; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6007 | 6009 |
| 6008 | 6010 |
| 6009 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6011 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6010 intptr_t index) { | 6012 intptr_t index) { |
| 6011 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6013 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6012 } | 6014 } |
| 6013 | 6015 |
| 6014 } // namespace dart | 6016 } // namespace dart |
| 6015 | 6017 |
| 6016 #endif // VM_OBJECT_H_ | 6018 #endif // VM_OBJECT_H_ |
| OLD | NEW |