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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // TODO(koda): Properly synchronize heap access to expand allowed operations. | 137 // TODO(koda): Properly synchronize heap access to expand allowed operations. |
138 static void EnterIsolateAsHelper(Isolate* isolate, | 138 static void EnterIsolateAsHelper(Isolate* isolate, |
139 bool bypass_safepoint = false); | 139 bool bypass_safepoint = false); |
140 static void ExitIsolateAsHelper(bool bypass_safepoint = false); | 140 static void ExitIsolateAsHelper(bool bypass_safepoint = false); |
141 | 141 |
142 // Called when the current thread transitions from mutator to collector. | 142 // Called when the current thread transitions from mutator to collector. |
143 // Empties the store buffer block into the isolate. | 143 // Empties the store buffer block into the isolate. |
144 // TODO(koda): Always run GC in separate thread. | 144 // TODO(koda): Always run GC in separate thread. |
145 static void PrepareForGC(); | 145 static void PrepareForGC(); |
146 | 146 |
147 #if defined(TARGET_OS_WINDOWS) | |
148 // Clears the state of the current thread and frees the allocation. | |
149 static void CleanUp(); | |
150 #endif | |
151 | |
152 // Called at VM startup. | 147 // Called at VM startup. |
153 static void InitOnceBeforeIsolate(); | 148 static void InitOnceBeforeIsolate(); |
154 static void InitOnceAfterObjectAndStubCode(); | 149 static void InitOnceAfterObjectAndStubCode(); |
155 | 150 |
156 // Called at VM shutdown | 151 // Called at VM shutdown |
157 static void Shutdown(); | 152 static void Shutdown(); |
158 ~Thread(); | 153 ~Thread(); |
159 | 154 |
160 // The topmost zone used for allocation in this thread. | 155 // The topmost zone used for allocation in this thread. |
161 Zone* zone() const { return state_.zone; } | 156 Zone* zone() const { return state_.zone; } |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 }; | 524 }; |
530 | 525 |
531 #if defined(TARGET_OS_WINDOWS) | 526 #if defined(TARGET_OS_WINDOWS) |
532 // Clears the state of the current thread and frees the allocation. | 527 // Clears the state of the current thread and frees the allocation. |
533 void WindowsThreadCleanUp(); | 528 void WindowsThreadCleanUp(); |
534 #endif | 529 #endif |
535 | 530 |
536 } // namespace dart | 531 } // namespace dart |
537 | 532 |
538 #endif // VM_THREAD_H_ | 533 #endif // VM_THREAD_H_ |
OLD | NEW |