| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 RUNTIME_VM_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_ISOLATE_H_ |
| 6 #define RUNTIME_VM_ISOLATE_H_ | 6 #define RUNTIME_VM_ISOLATE_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 "vm/atomic.h" | 10 #include "vm/atomic.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // Visits weak object pointers. | 171 // Visits weak object pointers. |
| 172 void VisitWeakPersistentHandles(HandleVisitor* visitor); | 172 void VisitWeakPersistentHandles(HandleVisitor* visitor); |
| 173 | 173 |
| 174 // Prepares all threads in an isolate for Garbage Collection. | 174 // Prepares all threads in an isolate for Garbage Collection. |
| 175 void PrepareForGC(); | 175 void PrepareForGC(); |
| 176 | 176 |
| 177 StoreBuffer* store_buffer() { return store_buffer_; } | 177 StoreBuffer* store_buffer() { return store_buffer_; } |
| 178 | 178 |
| 179 ThreadRegistry* thread_registry() const { return thread_registry_; } | 179 ThreadRegistry* thread_registry() const { return thread_registry_; } |
| 180 SafepointHandler* safepoint_handler() const { return safepoint_handler_; } | 180 SafepointHandler* safepoint_handler() const { return safepoint_handler_; } |
| 181 | 181 uint memory_high_watermark() const { return memory_high_watermark_; } |
| 182 ClassTable* class_table() { return &class_table_; } | 182 ClassTable* class_table() { return &class_table_; } |
| 183 static intptr_t class_table_offset() { | 183 static intptr_t class_table_offset() { |
| 184 return OFFSET_OF(Isolate, class_table_); | 184 return OFFSET_OF(Isolate, class_table_); |
| 185 } | 185 } |
| 186 | 186 |
| 187 // Prefers old classes when we are in the middle of a reload. | 187 // Prefers old classes when we are in the middle of a reload. |
| 188 RawClass* GetClassForHeapWalkAt(intptr_t cid); | 188 RawClass* GetClassForHeapWalkAt(intptr_t cid); |
| 189 | 189 |
| 190 static intptr_t ic_miss_code_offset() { | 190 static intptr_t ic_miss_code_offset() { |
| 191 return OFFSET_OF(Isolate, ic_miss_code_); | 191 return OFFSET_OF(Isolate, ic_miss_code_); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 void set_registered_service_extension_handlers( | 685 void set_registered_service_extension_handlers( |
| 686 const GrowableObjectArray& value); | 686 const GrowableObjectArray& value); |
| 687 | 687 |
| 688 Monitor* threads_lock() const; | 688 Monitor* threads_lock() const; |
| 689 Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); | 689 Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); |
| 690 void UnscheduleThread(Thread* thread, | 690 void UnscheduleThread(Thread* thread, |
| 691 bool is_mutator, | 691 bool is_mutator, |
| 692 bool bypass_safepoint = false); | 692 bool bypass_safepoint = false); |
| 693 | 693 |
| 694 // Updates the maximum memory usage in bytes of all zones in all threads of |
| 695 // the current isolate. |
| 696 void UpdateMemoryHighWatermark(); |
| 697 |
| 694 // DEPRECATED: Use Thread's methods instead. During migration, these default | 698 // DEPRECATED: Use Thread's methods instead. During migration, these default |
| 695 // to using the mutator thread (which must also be the current thread). | 699 // to using the mutator thread (which must also be the current thread). |
| 696 Zone* current_zone() const { | 700 Zone* current_zone() const { |
| 697 ASSERT(Thread::Current() == mutator_thread()); | 701 ASSERT(Thread::Current() == mutator_thread()); |
| 698 return mutator_thread()->zone(); | 702 return mutator_thread()->zone(); |
| 699 } | 703 } |
| 700 | 704 |
| 701 // Accessed from generated code: | 705 // Accessed from generated code: |
| 702 StoreBuffer* store_buffer_; | 706 StoreBuffer* store_buffer_; |
| 703 Heap* heap_; | 707 Heap* heap_; |
| 704 uword user_tag_; | 708 uword user_tag_; |
| 705 RawUserTag* current_tag_; | 709 RawUserTag* current_tag_; |
| 706 RawUserTag* default_tag_; | 710 RawUserTag* default_tag_; |
| 707 RawCode* ic_miss_code_; | 711 RawCode* ic_miss_code_; |
| 708 ObjectStore* object_store_; | 712 ObjectStore* object_store_; |
| 709 ClassTable class_table_; | 713 ClassTable class_table_; |
| 710 bool single_step_; | 714 bool single_step_; |
| 711 | 715 |
| 712 ThreadRegistry* thread_registry_; | 716 ThreadRegistry* thread_registry_; |
| 713 SafepointHandler* safepoint_handler_; | 717 SafepointHandler* safepoint_handler_; |
| 718 uint memory_high_watermark_; |
| 714 Dart_MessageNotifyCallback message_notify_callback_; | 719 Dart_MessageNotifyCallback message_notify_callback_; |
| 715 char* name_; | 720 char* name_; |
| 716 char* debugger_name_; | 721 char* debugger_name_; |
| 717 int64_t start_time_micros_; | 722 int64_t start_time_micros_; |
| 718 Dart_Port main_port_; | 723 Dart_Port main_port_; |
| 719 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 724 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
| 720 uint64_t pause_capability_; | 725 uint64_t pause_capability_; |
| 721 uint64_t terminate_capability_; | 726 uint64_t terminate_capability_; |
| 722 bool errors_fatal_; | 727 bool errors_fatal_; |
| 723 void* init_callback_data_; | 728 void* init_callback_data_; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 intptr_t* spawn_count_; | 994 intptr_t* spawn_count_; |
| 990 | 995 |
| 991 Dart_IsolateFlags isolate_flags_; | 996 Dart_IsolateFlags isolate_flags_; |
| 992 bool paused_; | 997 bool paused_; |
| 993 bool errors_are_fatal_; | 998 bool errors_are_fatal_; |
| 994 }; | 999 }; |
| 995 | 1000 |
| 996 } // namespace dart | 1001 } // namespace dart |
| 997 | 1002 |
| 998 #endif // RUNTIME_VM_ISOLATE_H_ | 1003 #endif // RUNTIME_VM_ISOLATE_H_ |
| OLD | NEW |