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