Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 8e84d008141b3ee5e2aa588e0ef0a633799f6c10..3512e474bd2b2fbfc6236cf20fa01adb4e93ee12 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -56,6 +56,7 @@ class RawError; |
class RawFloat32x4; |
class RawInt32x4; |
class RawUserTag; |
+class SafepointHandler; |
class SampleBuffer; |
class SendPort; |
class ServiceIdZone; |
@@ -126,9 +127,13 @@ class Isolate : public BaseIsolate { |
// Visits weak object pointers. |
void VisitWeakPersistentHandles(HandleVisitor* visitor); |
+ // Prepares all threads in an isolate for Garbage Collection. |
+ void PrepareForGC(); |
+ |
StoreBuffer* store_buffer() { return store_buffer_; } |
- ThreadRegistry* thread_registry() { return thread_registry_; } |
+ ThreadRegistry* thread_registry() const { return thread_registry_; } |
+ SafepointHandler* safepoint_handler() const { return safepoint_handler_; } |
ClassTable* class_table() { return &class_table_; } |
static intptr_t class_table_offset() { |
@@ -687,17 +692,10 @@ class Isolate : public BaseIsolate { |
void set_registered_service_extension_handlers( |
const GrowableObjectArray& value); |
- void ClearMutatorThread() { |
- mutator_thread_ = NULL; |
- } |
- void MakeCurrentThreadMutator(Thread* thread) { |
- ASSERT(thread == Thread::Current()); |
- DEBUG_ASSERT(IsIsolateOf(thread)); |
- mutator_thread_ = thread; |
- } |
-#if defined(DEBUG) |
- bool IsIsolateOf(Thread* thread); |
-#endif // DEBUG |
+ Monitor* threads_lock() const; |
+ Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); |
+ void UnscheduleThread( |
+ Thread* thread, bool is_mutator, bool bypass_sfepoint = false); |
rmacnak
2016/01/27 21:42:32
safepoint
siva
2016/01/28 18:22:46
Done.
|
// DEPRECATED: Use Thread's methods instead. During migration, these default |
// to using the mutator thread (which must also be the current thread). |
@@ -720,6 +718,7 @@ class Isolate : public BaseIsolate { |
bool single_step_; |
ThreadRegistry* thread_registry_; |
+ SafepointHandler* safepoint_handler_; |
Dart_MessageNotifyCallback message_notify_callback_; |
char* name_; |
char* debugger_name_; |
@@ -859,6 +858,7 @@ REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
#undef REUSABLE_FRIEND_DECLARATION |
friend class GCMarker; // VisitObjectPointers |
+ friend class SafepointHandler; |
friend class Scavenger; // VisitObjectPointers |
friend class ServiceIsolate; |
friend class Thread; |