| 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 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4335 return raw_ptr()->lazy_deopt_pc_offset_; | 4335 return raw_ptr()->lazy_deopt_pc_offset_; |
| 4336 } | 4336 } |
| 4337 void set_lazy_deopt_pc_offset(intptr_t pc) const { | 4337 void set_lazy_deopt_pc_offset(intptr_t pc) const { |
| 4338 StoreNonPointer(&raw_ptr()->lazy_deopt_pc_offset_, pc); | 4338 StoreNonPointer(&raw_ptr()->lazy_deopt_pc_offset_, pc); |
| 4339 } | 4339 } |
| 4340 | 4340 |
| 4341 bool IsAllocationStubCode() const; | 4341 bool IsAllocationStubCode() const; |
| 4342 bool IsStubCode() const; | 4342 bool IsStubCode() const; |
| 4343 bool IsFunctionCode() const; | 4343 bool IsFunctionCode() const; |
| 4344 | 4344 |
| 4345 void DisableDartCode() const; |
| 4346 |
| 4347 void DisableStubCode() const; |
| 4348 |
| 4349 void Enable() const { |
| 4350 if (!IsDisabled()) return; |
| 4351 ASSERT(instructions() != active_instructions()); |
| 4352 set_active_instructions(instructions()); |
| 4353 } |
| 4354 |
| 4355 bool IsDisabled() const { |
| 4356 return instructions() != active_instructions(); |
| 4357 } |
| 4358 |
| 4345 private: | 4359 private: |
| 4346 void set_state_bits(intptr_t bits) const; | 4360 void set_state_bits(intptr_t bits) const; |
| 4347 | 4361 |
| 4348 void set_object_pool(RawObjectPool* object_pool) const { | 4362 void set_object_pool(RawObjectPool* object_pool) const { |
| 4349 StorePointer(&raw_ptr()->object_pool_, object_pool); | 4363 StorePointer(&raw_ptr()->object_pool_, object_pool); |
| 4350 } | 4364 } |
| 4351 | 4365 |
| 4352 friend class RawObject; // For RawObject::SizeFromClass(). | 4366 friend class RawObject; // For RawObject::SizeFromClass(). |
| 4353 friend class RawCode; | 4367 friend class RawCode; |
| 4354 enum { | 4368 enum { |
| (...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8123 | 8137 |
| 8124 | 8138 |
| 8125 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8139 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8126 intptr_t index) { | 8140 intptr_t index) { |
| 8127 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8141 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8128 } | 8142 } |
| 8129 | 8143 |
| 8130 } // namespace dart | 8144 } // namespace dart |
| 8131 | 8145 |
| 8132 #endif // VM_OBJECT_H_ | 8146 #endif // VM_OBJECT_H_ |
| OLD | NEW |