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 4335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4346 return raw_ptr()->lazy_deopt_pc_offset_; | 4346 return raw_ptr()->lazy_deopt_pc_offset_; |
4347 } | 4347 } |
4348 void set_lazy_deopt_pc_offset(intptr_t pc) const { | 4348 void set_lazy_deopt_pc_offset(intptr_t pc) const { |
4349 StoreNonPointer(&raw_ptr()->lazy_deopt_pc_offset_, pc); | 4349 StoreNonPointer(&raw_ptr()->lazy_deopt_pc_offset_, pc); |
4350 } | 4350 } |
4351 | 4351 |
4352 bool IsAllocationStubCode() const; | 4352 bool IsAllocationStubCode() const; |
4353 bool IsStubCode() const; | 4353 bool IsStubCode() const; |
4354 bool IsFunctionCode() const; | 4354 bool IsFunctionCode() const; |
4355 | 4355 |
| 4356 void DisableDartCode() const; |
| 4357 |
| 4358 void DisableStubCode() const; |
| 4359 |
| 4360 void Enable() const { |
| 4361 if (!IsDisabled()) return; |
| 4362 ASSERT(instructions() != active_instructions()); |
| 4363 set_active_instructions(instructions()); |
| 4364 } |
| 4365 |
| 4366 bool IsDisabled() const { |
| 4367 return instructions() != active_instructions(); |
| 4368 } |
| 4369 |
4356 private: | 4370 private: |
4357 void set_state_bits(intptr_t bits) const; | 4371 void set_state_bits(intptr_t bits) const; |
4358 | 4372 |
4359 void set_object_pool(RawObjectPool* object_pool) const { | 4373 void set_object_pool(RawObjectPool* object_pool) const { |
4360 StorePointer(&raw_ptr()->object_pool_, object_pool); | 4374 StorePointer(&raw_ptr()->object_pool_, object_pool); |
4361 } | 4375 } |
4362 | 4376 |
4363 friend class RawObject; // For RawObject::SizeFromClass(). | 4377 friend class RawObject; // For RawObject::SizeFromClass(). |
4364 friend class RawCode; | 4378 friend class RawCode; |
4365 enum { | 4379 enum { |
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8134 | 8148 |
8135 | 8149 |
8136 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8150 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8137 intptr_t index) { | 8151 intptr_t index) { |
8138 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8152 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8139 } | 8153 } |
8140 | 8154 |
8141 } // namespace dart | 8155 } // namespace dart |
8142 | 8156 |
8143 #endif // VM_OBJECT_H_ | 8157 #endif // VM_OBJECT_H_ |
OLD | NEW |