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 RUNTIME_VM_THREAD_H_ | 5 #ifndef RUNTIME_VM_THREAD_H_ |
6 #define RUNTIME_VM_THREAD_H_ | 6 #define RUNTIME_VM_THREAD_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/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class RawError; | 45 class RawError; |
46 class RawGrowableObjectArray; | 46 class RawGrowableObjectArray; |
47 class RawString; | 47 class RawString; |
48 class RuntimeEntry; | 48 class RuntimeEntry; |
49 class Smi; | 49 class Smi; |
50 class StackResource; | 50 class StackResource; |
51 class String; | 51 class String; |
52 class TimelineStream; | 52 class TimelineStream; |
53 class TypeArguments; | 53 class TypeArguments; |
54 class TypeParameter; | 54 class TypeParameter; |
55 class TypeRangeCache; | |
56 class Zone; | 55 class Zone; |
57 | 56 |
58 #define REUSABLE_HANDLE_LIST(V) \ | 57 #define REUSABLE_HANDLE_LIST(V) \ |
59 V(AbstractType) \ | 58 V(AbstractType) \ |
60 V(Array) \ | 59 V(Array) \ |
61 V(Class) \ | 60 V(Class) \ |
62 V(Code) \ | 61 V(Code) \ |
63 V(Error) \ | 62 V(Error) \ |
64 V(ExceptionHandlers) \ | 63 V(ExceptionHandlers) \ |
65 V(Field) \ | 64 V(Field) \ |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 CHA* cha() const { | 297 CHA* cha() const { |
299 ASSERT(isolate_ != NULL); | 298 ASSERT(isolate_ != NULL); |
300 return cha_; | 299 return cha_; |
301 } | 300 } |
302 | 301 |
303 void set_cha(CHA* value) { | 302 void set_cha(CHA* value) { |
304 ASSERT(isolate_ != NULL); | 303 ASSERT(isolate_ != NULL); |
305 cha_ = value; | 304 cha_ = value; |
306 } | 305 } |
307 | 306 |
308 TypeRangeCache* type_range_cache() const { return type_range_cache_; } | |
309 void set_type_range_cache(TypeRangeCache* value) { | |
310 type_range_cache_ = value; | |
311 } | |
312 | |
313 int32_t no_callback_scope_depth() const { return no_callback_scope_depth_; } | 307 int32_t no_callback_scope_depth() const { return no_callback_scope_depth_; } |
314 | 308 |
315 void IncrementNoCallbackScopeDepth() { | 309 void IncrementNoCallbackScopeDepth() { |
316 ASSERT(no_callback_scope_depth_ < INT_MAX); | 310 ASSERT(no_callback_scope_depth_ < INT_MAX); |
317 no_callback_scope_depth_ += 1; | 311 no_callback_scope_depth_ += 1; |
318 } | 312 } |
319 | 313 |
320 void DecrementNoCallbackScopeDepth() { | 314 void DecrementNoCallbackScopeDepth() { |
321 ASSERT(no_callback_scope_depth_ > 0); | 315 ASSERT(no_callback_scope_depth_ > 0); |
322 no_callback_scope_depth_ -= 1; | 316 no_callback_scope_depth_ -= 1; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 #endif | 691 #endif |
698 VMHandles reusable_handles_; | 692 VMHandles reusable_handles_; |
699 uword saved_stack_limit_; | 693 uword saved_stack_limit_; |
700 intptr_t defer_oob_messages_count_; | 694 intptr_t defer_oob_messages_count_; |
701 uint16_t deferred_interrupts_mask_; | 695 uint16_t deferred_interrupts_mask_; |
702 uint16_t deferred_interrupts_; | 696 uint16_t deferred_interrupts_; |
703 int32_t stack_overflow_count_; | 697 int32_t stack_overflow_count_; |
704 | 698 |
705 // Compiler state: | 699 // Compiler state: |
706 CHA* cha_; | 700 CHA* cha_; |
707 TypeRangeCache* type_range_cache_; | |
708 intptr_t deopt_id_; // Compilation specific counter. | 701 intptr_t deopt_id_; // Compilation specific counter. |
709 RawGrowableObjectArray* pending_functions_; | 702 RawGrowableObjectArray* pending_functions_; |
710 | 703 |
711 // JumpToExceptionHandler state: | 704 // JumpToExceptionHandler state: |
712 RawObject* active_exception_; | 705 RawObject* active_exception_; |
713 RawObject* active_stacktrace_; | 706 RawObject* active_stacktrace_; |
714 uword resume_pc_; | 707 uword resume_pc_; |
715 | 708 |
716 RawError* sticky_error_; | 709 RawError* sticky_error_; |
717 | 710 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 // Disable thread interrupts. | 777 // Disable thread interrupts. |
785 class DisableThreadInterruptsScope : public StackResource { | 778 class DisableThreadInterruptsScope : public StackResource { |
786 public: | 779 public: |
787 explicit DisableThreadInterruptsScope(Thread* thread); | 780 explicit DisableThreadInterruptsScope(Thread* thread); |
788 ~DisableThreadInterruptsScope(); | 781 ~DisableThreadInterruptsScope(); |
789 }; | 782 }; |
790 | 783 |
791 } // namespace dart | 784 } // namespace dart |
792 | 785 |
793 #endif // RUNTIME_VM_THREAD_H_ | 786 #endif // RUNTIME_VM_THREAD_H_ |
OLD | NEW |