| 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 "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // are allocated. | 157 // are allocated. |
| 158 ApiLocalScope* api_top_scope() const { return api_top_scope_; } | 158 ApiLocalScope* api_top_scope() const { return api_top_scope_; } |
| 159 void set_api_top_scope(ApiLocalScope* value) { api_top_scope_ = value; } | 159 void set_api_top_scope(ApiLocalScope* value) { api_top_scope_ = value; } |
| 160 | 160 |
| 161 // The isolate that this thread is operating on, or NULL if none. | 161 // The isolate that this thread is operating on, or NULL if none. |
| 162 Isolate* isolate() const { return isolate_; } | 162 Isolate* isolate() const { return isolate_; } |
| 163 static intptr_t isolate_offset() { | 163 static intptr_t isolate_offset() { |
| 164 return OFFSET_OF(Thread, isolate_); | 164 return OFFSET_OF(Thread, isolate_); |
| 165 } | 165 } |
| 166 bool IsMutatorThread() const; | 166 bool IsMutatorThread() const; |
| 167 bool CanCollectGarbage() const; |
| 167 | 168 |
| 168 // Is |this| executing Dart code? | 169 // Is |this| executing Dart code? |
| 169 bool IsExecutingDartCode() const; | 170 bool IsExecutingDartCode() const; |
| 170 | 171 |
| 171 // Has |this| exited Dart code? | 172 // Has |this| exited Dart code? |
| 172 bool HasExitedDartCode() const; | 173 bool HasExitedDartCode() const; |
| 173 | 174 |
| 174 // The (topmost) CHA for the compilation in this thread. | 175 // The (topmost) CHA for the compilation in this thread. |
| 175 CHA* cha() const { | 176 CHA* cha() const { |
| 176 ASSERT(isolate_ != NULL); | 177 ASSERT(isolate_ != NULL); |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // Disable thread interrupts. | 497 // Disable thread interrupts. |
| 497 class DisableThreadInterruptsScope : public StackResource { | 498 class DisableThreadInterruptsScope : public StackResource { |
| 498 public: | 499 public: |
| 499 explicit DisableThreadInterruptsScope(Thread* thread); | 500 explicit DisableThreadInterruptsScope(Thread* thread); |
| 500 ~DisableThreadInterruptsScope(); | 501 ~DisableThreadInterruptsScope(); |
| 501 }; | 502 }; |
| 502 | 503 |
| 503 } // namespace dart | 504 } // namespace dart |
| 504 | 505 |
| 505 #endif // VM_THREAD_H_ | 506 #endif // VM_THREAD_H_ |
| OLD | NEW |