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