| 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 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2321 } | 2321 } |
| 2322 | 2322 |
| 2323 private: | 2323 private: |
| 2324 void set_size(intptr_t size) const { | 2324 void set_size(intptr_t size) const { |
| 2325 raw_ptr()->size_ = size; | 2325 raw_ptr()->size_ = size; |
| 2326 } | 2326 } |
| 2327 void set_code(RawCode* code) const { | 2327 void set_code(RawCode* code) const { |
| 2328 raw_ptr()->code_ = code; | 2328 raw_ptr()->code_ = code; |
| 2329 } | 2329 } |
| 2330 void set_object_pool(RawArray* object_pool) const { | 2330 void set_object_pool(RawArray* object_pool) const { |
| 2331 ASSERT(object_pool->IsOldObject()); | 2331 StorePointer(&raw_ptr()->object_pool_, object_pool); |
| 2332 raw_ptr()->object_pool_ = object_pool; | |
| 2333 } | 2332 } |
| 2334 | 2333 |
| 2335 // New is a private method as RawInstruction and RawCode objects should | 2334 // New is a private method as RawInstruction and RawCode objects should |
| 2336 // only be created using the Code::FinalizeCode method. This method creates | 2335 // only be created using the Code::FinalizeCode method. This method creates |
| 2337 // the RawInstruction and RawCode objects, sets up the pointer offsets | 2336 // the RawInstruction and RawCode objects, sets up the pointer offsets |
| 2338 // and links the two in a GC safe manner. | 2337 // and links the two in a GC safe manner. |
| 2339 static RawInstructions* New(intptr_t size); | 2338 static RawInstructions* New(intptr_t size); |
| 2340 | 2339 |
| 2341 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); | 2340 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); |
| 2342 friend class Class; | 2341 friend class Class; |
| (...skipping 4591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6934 | 6933 |
| 6935 | 6934 |
| 6936 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6935 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6937 intptr_t index) { | 6936 intptr_t index) { |
| 6938 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6937 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6939 } | 6938 } |
| 6940 | 6939 |
| 6941 } // namespace dart | 6940 } // namespace dart |
| 6942 | 6941 |
| 6943 #endif // VM_OBJECT_H_ | 6942 #endif // VM_OBJECT_H_ |
| OLD | NEW |