OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_THREAD_H_ | 5 #ifndef VM_THREAD_H_ |
6 #define VM_THREAD_H_ | 6 #define VM_THREAD_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/handles.h" | 9 #include "vm/handles.h" |
10 #include "vm/os_thread.h" | 10 #include "vm/os_thread.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 ~Thread(); | 154 ~Thread(); |
155 | 155 |
156 // The topmost zone used for allocation in this thread. | 156 // The topmost zone used for allocation in this thread. |
157 Zone* zone() const { return state_.zone; } | 157 Zone* zone() const { return state_.zone; } |
158 | 158 |
159 // The isolate that this thread is operating on, or NULL if none. | 159 // The isolate that this thread is operating on, or NULL if none. |
160 Isolate* isolate() const { return isolate_; } | 160 Isolate* isolate() const { return isolate_; } |
161 static intptr_t isolate_offset() { | 161 static intptr_t isolate_offset() { |
162 return OFFSET_OF(Thread, isolate_); | 162 return OFFSET_OF(Thread, isolate_); |
163 } | 163 } |
| 164 bool IsMutatorThread() const; |
164 | 165 |
165 // The (topmost) CHA for the compilation in this thread. | 166 // The (topmost) CHA for the compilation in this thread. |
166 CHA* cha() const; | 167 CHA* cha() const; |
167 void set_cha(CHA* value); | 168 void set_cha(CHA* value); |
168 | 169 |
169 int32_t no_callback_scope_depth() const { | 170 int32_t no_callback_scope_depth() const { |
170 return no_callback_scope_depth_; | 171 return no_callback_scope_depth_; |
171 } | 172 } |
172 | 173 |
173 void IncrementNoCallbackScopeDepth() { | 174 void IncrementNoCallbackScopeDepth() { |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 }; | 530 }; |
530 | 531 |
531 #if defined(TARGET_OS_WINDOWS) | 532 #if defined(TARGET_OS_WINDOWS) |
532 // Clears the state of the current thread and frees the allocation. | 533 // Clears the state of the current thread and frees the allocation. |
533 void WindowsThreadCleanUp(); | 534 void WindowsThreadCleanUp(); |
534 #endif | 535 #endif |
535 | 536 |
536 } // namespace dart | 537 } // namespace dart |
537 | 538 |
538 #endif // VM_THREAD_H_ | 539 #endif // VM_THREAD_H_ |
OLD | NEW |