Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index ff1682cbdda1990ddf364cc371d2de37bdfb39db..b1e19fcbc9265212108ef337c13ce542d1d275ee 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -36,6 +36,7 @@ class ICData; |
class Instance; |
class IsolateProfilerData; |
class IsolateSpawnState; |
+class InterruptableThreadState; |
class LongJumpScope; |
class MessageHandler; |
class Mutex; |
@@ -402,12 +403,21 @@ class Isolate : public BaseIsolate { |
profiler_data_ = profiler_data; |
} |
- IsolateProfilerData* profiler_data() { |
+ IsolateProfilerData* profiler_data() const { |
return profiler_data_; |
} |
void PrintToJSONStream(JSONStream* stream); |
+ void set_thread_state(InterruptableThreadState* state) { |
+ ASSERT((thread_state_ == NULL) || (state == NULL)); |
+ thread_state_ = state; |
+ } |
+ |
+ InterruptableThreadState* thread_state() const { |
+ return thread_state_; |
+ } |
+ |
private: |
Isolate(); |
@@ -462,6 +472,7 @@ class Isolate : public BaseIsolate { |
IsolateProfilerData* profiler_data_; |
Mutex profiler_data_mutex_; |
+ InterruptableThreadState* thread_state_; |
// Reusable handles support. |
#define REUSABLE_HANDLE_FIELDS(object) \ |
@@ -483,8 +494,25 @@ class Isolate : public BaseIsolate { |
static Dart_IsolateInterruptCallback vmstats_callback_; |
static Dart_ServiceIsolateCreateCalback service_create_callback_; |
+ // List of existing isolates. |
+ static void IsolateCreated(Isolate* isolate); |
+ static void IsolateShutdown(Isolate* isolate); |
+ static void ResizeIsolates(intptr_t new_capacity); |
+ static intptr_t FindIsolateIndex(Isolate* isolate); |
+ static void CheckNoIsolateHasThreadData(InterruptableThreadState* state); |
+ static Monitor* isolates_monitor_; |
+ static Isolate** isolates_; |
+ static intptr_t isolates_capacity_; |
+ static intptr_t isolates_size_; |
siva
2014/02/05 19:09:15
Why not just make the isolate list a singly linked
Cutch
2014/02/05 23:00:31
Done.
|
+ |
friend class ReusableHandleScope; |
friend class ReusableObjectHandleScope; |
+ friend class ThreadInterrupter; |
+ friend class ThreadInterrupterAndroid; |
+ friend class ThreadInterrupterMacOS; |
+ friend class ThreadInterrupterLinux; |
+ friend class ThreadInterrupterWin; |
siva
2014/02/05 19:09:15
Seems weird that you are having to friend a bunch
Cutch
2014/02/05 23:00:31
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(Isolate); |
}; |