| 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/os_thread.h" | 9 #include "vm/os_thread.h" |
| 10 #include "vm/store_buffer.h" | 10 #include "vm/store_buffer.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 #if defined(TARGET_OS_WINDOWS) | 69 #if defined(TARGET_OS_WINDOWS) |
| 70 // Clears the state of the current thread and frees the allocation. | 70 // Clears the state of the current thread and frees the allocation. |
| 71 static void CleanUp(); | 71 static void CleanUp(); |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 // Called at VM startup. | 74 // Called at VM startup. |
| 75 static void InitOnceBeforeIsolate(); | 75 static void InitOnceBeforeIsolate(); |
| 76 static void InitOnceAfterObjectAndStubCode(); | 76 static void InitOnceAfterObjectAndStubCode(); |
| 77 | 77 |
| 78 ~Thread(); |
| 79 |
| 78 // The topmost zone used for allocation in this thread. | 80 // The topmost zone used for allocation in this thread. |
| 79 Zone* zone() const { return state_.zone; } | 81 Zone* zone() const { return state_.zone; } |
| 80 | 82 |
| 81 // The isolate that this thread is operating on, or NULL if none. | 83 // The isolate that this thread is operating on, or NULL if none. |
| 82 Isolate* isolate() const { return isolate_; } | 84 Isolate* isolate() const { return isolate_; } |
| 83 static intptr_t isolate_offset() { | 85 static intptr_t isolate_offset() { |
| 84 return OFFSET_OF(Thread, isolate_); | 86 return OFFSET_OF(Thread, isolate_); |
| 85 } | 87 } |
| 86 | 88 |
| 87 // The (topmost) CHA for the compilation in the isolate of this thread. | 89 // The (topmost) CHA for the compilation in the isolate of this thread. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void Unschedule(); | 167 void Unschedule(); |
| 166 | 168 |
| 167 friend class Isolate; | 169 friend class Isolate; |
| 168 friend class StackZone; | 170 friend class StackZone; |
| 169 DISALLOW_COPY_AND_ASSIGN(Thread); | 171 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 170 }; | 172 }; |
| 171 | 173 |
| 172 } // namespace dart | 174 } // namespace dart |
| 173 | 175 |
| 174 #endif // VM_THREAD_H_ | 176 #endif // VM_THREAD_H_ |
| OLD | NEW |