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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 LongJumpScope* long_jump_base() const { return long_jump_base_; } | 464 LongJumpScope* long_jump_base() const { return long_jump_base_; } |
465 void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; } | 465 void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; } |
466 | 466 |
467 uword vm_tag() const { return vm_tag_; } | 467 uword vm_tag() const { return vm_tag_; } |
468 void set_vm_tag(uword tag) { vm_tag_ = tag; } | 468 void set_vm_tag(uword tag) { vm_tag_ = tag; } |
469 static intptr_t vm_tag_offset() { return OFFSET_OF(Thread, vm_tag_); } | 469 static intptr_t vm_tag_offset() { return OFFSET_OF(Thread, vm_tag_); } |
470 | 470 |
471 RawGrowableObjectArray* pending_functions(); | 471 RawGrowableObjectArray* pending_functions(); |
472 void clear_pending_functions(); | 472 void clear_pending_functions(); |
473 | 473 |
| 474 RawObject* active_exception() const { return active_exception_; } |
| 475 void set_active_exception(const Object& value); |
| 476 static intptr_t active_exception_offset() { |
| 477 return OFFSET_OF(Thread, active_exception_); |
| 478 } |
| 479 |
| 480 RawObject* active_stacktrace() const { return active_stacktrace_; } |
| 481 void set_active_stacktrace(const Object& value); |
| 482 static intptr_t active_stacktrace_offset() { |
| 483 return OFFSET_OF(Thread, active_stacktrace_); |
| 484 } |
| 485 |
| 486 uword resume_pc() const { return resume_pc_; } |
| 487 void set_resume_pc(uword value) { resume_pc_ = value; } |
| 488 static uword resume_pc_offset() { return OFFSET_OF(Thread, resume_pc_); } |
| 489 |
474 RawError* sticky_error() const; | 490 RawError* sticky_error() const; |
475 void set_sticky_error(const Error& value); | 491 void set_sticky_error(const Error& value); |
476 void clear_sticky_error(); | 492 void clear_sticky_error(); |
477 | 493 |
478 CompilerStats* compiler_stats() { return compiler_stats_; } | 494 CompilerStats* compiler_stats() { return compiler_stats_; } |
479 | 495 |
480 #if defined(DEBUG) | 496 #if defined(DEBUG) |
481 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 497 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
482 void set_reusable_##object##_handle_scope_active(bool value) { \ | 498 void set_reusable_##object##_handle_scope_active(bool value) { \ |
483 reusable_##object##_handle_scope_active_ = value; \ | 499 reusable_##object##_handle_scope_active_ = value; \ |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 uint16_t deferred_interrupts_mask_; | 693 uint16_t deferred_interrupts_mask_; |
678 uint16_t deferred_interrupts_; | 694 uint16_t deferred_interrupts_; |
679 int32_t stack_overflow_count_; | 695 int32_t stack_overflow_count_; |
680 | 696 |
681 // Compiler state: | 697 // Compiler state: |
682 CHA* cha_; | 698 CHA* cha_; |
683 TypeRangeCache* type_range_cache_; | 699 TypeRangeCache* type_range_cache_; |
684 intptr_t deopt_id_; // Compilation specific counter. | 700 intptr_t deopt_id_; // Compilation specific counter. |
685 RawGrowableObjectArray* pending_functions_; | 701 RawGrowableObjectArray* pending_functions_; |
686 | 702 |
| 703 // JumpToExceptionHandler state: |
| 704 RawObject* active_exception_; |
| 705 RawObject* active_stacktrace_; |
| 706 uword resume_pc_; |
| 707 |
687 RawError* sticky_error_; | 708 RawError* sticky_error_; |
688 | 709 |
689 CompilerStats* compiler_stats_; | 710 CompilerStats* compiler_stats_; |
690 | 711 |
691 // Reusable handles support. | 712 // Reusable handles support. |
692 #define REUSABLE_HANDLE_FIELDS(object) object* object##_handle_; | 713 #define REUSABLE_HANDLE_FIELDS(object) object* object##_handle_; |
693 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 714 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
694 #undef REUSABLE_HANDLE_FIELDS | 715 #undef REUSABLE_HANDLE_FIELDS |
695 | 716 |
696 #if defined(DEBUG) | 717 #if defined(DEBUG) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // Disable thread interrupts. | 776 // Disable thread interrupts. |
756 class DisableThreadInterruptsScope : public StackResource { | 777 class DisableThreadInterruptsScope : public StackResource { |
757 public: | 778 public: |
758 explicit DisableThreadInterruptsScope(Thread* thread); | 779 explicit DisableThreadInterruptsScope(Thread* thread); |
759 ~DisableThreadInterruptsScope(); | 780 ~DisableThreadInterruptsScope(); |
760 }; | 781 }; |
761 | 782 |
762 } // namespace dart | 783 } // namespace dart |
763 | 784 |
764 #endif // RUNTIME_VM_THREAD_H_ | 785 #endif // RUNTIME_VM_THREAD_H_ |
OLD | NEW |