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 VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define 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/base_isolate.h" | 10 #include "vm/base_isolate.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 Dart_MessageNotifyCallback message_notify_callback() const { | 161 Dart_MessageNotifyCallback message_notify_callback() const { |
162 return message_notify_callback_; | 162 return message_notify_callback_; |
163 } | 163 } |
164 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 164 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
165 message_notify_callback_ = value; | 165 message_notify_callback_ = value; |
166 } | 166 } |
167 | 167 |
168 // A thread that operates on this isolate and may execute Dart code. | 168 // A thread that operates on this isolate and may execute Dart code. |
169 // No other threads operating on this isolate may execute Dart code. | 169 // No other threads operating on this isolate may execute Dart code. |
170 // TODO(koda): Remove after caching current thread in generated code. | 170 // TODO(koda): Remove after pivoting to thread in NativeArguments. |
171 Thread* mutator_thread() { | 171 Thread* mutator_thread() { |
172 DEBUG_ASSERT(mutator_thread_ == NULL || IsIsolateOf(mutator_thread_)); | 172 DEBUG_ASSERT(mutator_thread_ == NULL || IsIsolateOf(mutator_thread_)); |
173 return mutator_thread_; | 173 return mutator_thread_; |
174 } | 174 } |
| 175 // TODO(koda): Remove after pivoting to thread in JumpToExceptionHandler. |
| 176 static intptr_t mutator_thread_offset() { |
| 177 return OFFSET_OF(Isolate, mutator_thread_); |
| 178 } |
175 #if defined(DEBUG) | 179 #if defined(DEBUG) |
176 bool IsIsolateOf(Thread* thread); | 180 bool IsIsolateOf(Thread* thread); |
177 #endif // DEBUG | 181 #endif // DEBUG |
178 | 182 |
179 const char* name() const { return name_; } | 183 const char* name() const { return name_; } |
180 const char* debugger_name() const { return debugger_name_; } | 184 const char* debugger_name() const { return debugger_name_; } |
181 void set_debugger_name(const char* name); | 185 void set_debugger_name(const char* name); |
182 | 186 |
183 // TODO(koda): Move to Thread. | 187 // TODO(koda): Move to Thread. |
184 class Log* Log() const; | 188 class Log* Log() const; |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 uint8_t* serialized_args_; | 967 uint8_t* serialized_args_; |
964 intptr_t serialized_args_len_; | 968 intptr_t serialized_args_len_; |
965 uint8_t* serialized_message_; | 969 uint8_t* serialized_message_; |
966 intptr_t serialized_message_len_; | 970 intptr_t serialized_message_len_; |
967 bool paused_; | 971 bool paused_; |
968 }; | 972 }; |
969 | 973 |
970 } // namespace dart | 974 } // namespace dart |
971 | 975 |
972 #endif // VM_ISOLATE_H_ | 976 #endif // VM_ISOLATE_H_ |
OLD | NEW |