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 26 matching lines...) Expand all Loading... |
37 class LongJumpScope; | 37 class LongJumpScope; |
38 class Object; | 38 class Object; |
39 class OSThread; | 39 class OSThread; |
40 class JSONObject; | 40 class JSONObject; |
41 class PcDescriptors; | 41 class PcDescriptors; |
42 class RawBool; | 42 class RawBool; |
43 class RawObject; | 43 class RawObject; |
44 class RawCode; | 44 class RawCode; |
45 class RawError; | 45 class RawError; |
46 class RawGrowableObjectArray; | 46 class RawGrowableObjectArray; |
| 47 class RawStackTrace; |
47 class RawString; | 48 class RawString; |
48 class RuntimeEntry; | 49 class RuntimeEntry; |
49 class Smi; | 50 class Smi; |
50 class StackResource; | 51 class StackResource; |
| 52 class StackTrace; |
51 class String; | 53 class String; |
52 class TimelineStream; | 54 class TimelineStream; |
53 class TypeArguments; | 55 class TypeArguments; |
54 class TypeParameter; | 56 class TypeParameter; |
55 class Zone; | 57 class Zone; |
56 | 58 |
57 #define REUSABLE_HANDLE_LIST(V) \ | 59 #define REUSABLE_HANDLE_LIST(V) \ |
58 V(AbstractType) \ | 60 V(AbstractType) \ |
59 V(Array) \ | 61 V(Array) \ |
60 V(Class) \ | 62 V(Class) \ |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 500 } |
499 | 501 |
500 uword resume_pc() const { return resume_pc_; } | 502 uword resume_pc() const { return resume_pc_; } |
501 void set_resume_pc(uword value) { resume_pc_ = value; } | 503 void set_resume_pc(uword value) { resume_pc_ = value; } |
502 static uword resume_pc_offset() { return OFFSET_OF(Thread, resume_pc_); } | 504 static uword resume_pc_offset() { return OFFSET_OF(Thread, resume_pc_); } |
503 | 505 |
504 RawError* sticky_error() const; | 506 RawError* sticky_error() const; |
505 void set_sticky_error(const Error& value); | 507 void set_sticky_error(const Error& value); |
506 void clear_sticky_error(); | 508 void clear_sticky_error(); |
507 | 509 |
| 510 RawStackTrace* async_stack_trace() const; |
| 511 void set_async_stack_trace(const StackTrace& stack_trace); |
| 512 void clear_async_stack_trace(); |
| 513 static intptr_t async_stack_trace_offset() { |
| 514 return OFFSET_OF(Thread, async_stack_trace_); |
| 515 } |
| 516 |
508 CompilerStats* compiler_stats() { return compiler_stats_; } | 517 CompilerStats* compiler_stats() { return compiler_stats_; } |
509 | 518 |
510 #if defined(DEBUG) | 519 #if defined(DEBUG) |
511 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 520 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
512 void set_reusable_##object##_handle_scope_active(bool value) { \ | 521 void set_reusable_##object##_handle_scope_active(bool value) { \ |
513 reusable_##object##_handle_scope_active_ = value; \ | 522 reusable_##object##_handle_scope_active_ = value; \ |
514 } \ | 523 } \ |
515 bool reusable_##object##_handle_scope_active() const { \ | 524 bool reusable_##object##_handle_scope_active() const { \ |
516 return reusable_##object##_handle_scope_active_; \ | 525 return reusable_##object##_handle_scope_active_; \ |
517 } | 526 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 684 |
676 // Accessed from generated code: | 685 // Accessed from generated code: |
677 uword stack_limit_; | 686 uword stack_limit_; |
678 uword stack_overflow_flags_; | 687 uword stack_overflow_flags_; |
679 Isolate* isolate_; | 688 Isolate* isolate_; |
680 Heap* heap_; | 689 Heap* heap_; |
681 uword top_exit_frame_info_; | 690 uword top_exit_frame_info_; |
682 StoreBufferBlock* store_buffer_block_; | 691 StoreBufferBlock* store_buffer_block_; |
683 uword vm_tag_; | 692 uword vm_tag_; |
684 TaskKind task_kind_; | 693 TaskKind task_kind_; |
| 694 RawStackTrace* async_stack_trace_; |
685 // State that is cached in the TLS for fast access in generated code. | 695 // State that is cached in the TLS for fast access in generated code. |
686 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \ | 696 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \ |
687 type_name member_name; | 697 type_name member_name; |
688 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS) | 698 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS) |
689 #undef DECLARE_MEMBERS | 699 #undef DECLARE_MEMBERS |
690 | 700 |
691 #define DECLARE_MEMBERS(name) uword name##_entry_point_; | 701 #define DECLARE_MEMBERS(name) uword name##_entry_point_; |
692 RUNTIME_ENTRY_LIST(DECLARE_MEMBERS) | 702 RUNTIME_ENTRY_LIST(DECLARE_MEMBERS) |
693 #undef DECLARE_MEMBERS | 703 #undef DECLARE_MEMBERS |
694 | 704 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 // Disable thread interrupts. | 810 // Disable thread interrupts. |
801 class DisableThreadInterruptsScope : public StackResource { | 811 class DisableThreadInterruptsScope : public StackResource { |
802 public: | 812 public: |
803 explicit DisableThreadInterruptsScope(Thread* thread); | 813 explicit DisableThreadInterruptsScope(Thread* thread); |
804 ~DisableThreadInterruptsScope(); | 814 ~DisableThreadInterruptsScope(); |
805 }; | 815 }; |
806 | 816 |
807 } // namespace dart | 817 } // namespace dart |
808 | 818 |
809 #endif // RUNTIME_VM_THREAD_H_ | 819 #endif // RUNTIME_VM_THREAD_H_ |
OLD | NEW |