OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 mutator_thread_ = thread; | 747 mutator_thread_ = thread; |
748 } | 748 } |
749 #if defined(DEBUG) | 749 #if defined(DEBUG) |
750 bool IsIsolateOf(Thread* thread); | 750 bool IsIsolateOf(Thread* thread); |
751 #endif // DEBUG | 751 #endif // DEBUG |
752 | 752 |
753 // Accessed from generated code: | 753 // Accessed from generated code: |
754 uword stack_limit_; | 754 uword stack_limit_; |
755 StoreBuffer* store_buffer_; | 755 StoreBuffer* store_buffer_; |
756 Heap* heap_; | 756 Heap* heap_; |
757 uword vm_tag_; | |
758 uword user_tag_; | 757 uword user_tag_; |
759 RawUserTag* current_tag_; | 758 RawUserTag* current_tag_; |
760 RawUserTag* default_tag_; | 759 RawUserTag* default_tag_; |
761 ClassTable class_table_; | 760 ClassTable class_table_; |
762 bool single_step_; | 761 bool single_step_; |
763 | 762 |
764 ThreadRegistry* thread_registry_; | 763 ThreadRegistry* thread_registry_; |
765 Dart_MessageNotifyCallback message_notify_callback_; | 764 Dart_MessageNotifyCallback message_notify_callback_; |
766 char* name_; | 765 char* name_; |
767 char* debugger_name_; | 766 char* debugger_name_; |
768 int64_t start_time_; | 767 int64_t start_time_; |
769 Dart_Port main_port_; | 768 Dart_Port main_port_; |
770 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 769 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
771 uint64_t pause_capability_; | 770 uint64_t pause_capability_; |
772 uint64_t terminate_capability_; | 771 uint64_t terminate_capability_; |
773 bool errors_fatal_; | 772 bool errors_fatal_; |
774 ObjectStore* object_store_; | 773 ObjectStore* object_store_; |
775 uword top_exit_frame_info_; | 774 uword top_exit_frame_info_; |
776 void* init_callback_data_; | 775 void* init_callback_data_; |
777 Dart_EnvironmentCallback environment_callback_; | 776 Dart_EnvironmentCallback environment_callback_; |
778 Dart_LibraryTagHandler library_tag_handler_; | 777 Dart_LibraryTagHandler library_tag_handler_; |
779 ApiState* api_state_; | 778 ApiState* api_state_; |
780 Debugger* debugger_; | 779 Debugger* debugger_; |
781 bool resume_request_; | 780 bool resume_request_; |
782 int64_t last_resume_timestamp_; | 781 int64_t last_resume_timestamp_; |
783 bool has_compiled_code_; // Can check that no compilation occured. | 782 bool has_compiled_code_; // Can check that no compilation occured. |
784 Flags flags_; | 783 Flags flags_; |
785 Random random_; | 784 Random random_; |
786 Simulator* simulator_; | 785 Simulator* simulator_; |
787 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 786 Mutex* mutex_; // protects stack_limit_, saved_stack_limit_, compiler stats. |
788 uword saved_stack_limit_; | 787 uword saved_stack_limit_; |
789 uword stack_base_; | 788 uword stack_base_; |
790 uword stack_overflow_flags_; | 789 uword stack_overflow_flags_; |
791 int32_t stack_overflow_count_; | 790 int32_t stack_overflow_count_; |
792 MessageHandler* message_handler_; | 791 MessageHandler* message_handler_; |
793 IsolateSpawnState* spawn_state_; | 792 IsolateSpawnState* spawn_state_; |
794 bool is_runnable_; | 793 bool is_runnable_; |
795 Dart_GcPrologueCallback gc_prologue_callback_; | 794 Dart_GcPrologueCallback gc_prologue_callback_; |
796 Dart_GcEpilogueCallback gc_epilogue_callback_; | 795 Dart_GcEpilogueCallback gc_epilogue_callback_; |
797 intptr_t defer_finalization_count_; | 796 intptr_t defer_finalization_count_; |
798 DeoptContext* deopt_context_; | 797 DeoptContext* deopt_context_; |
799 BackgroundCompiler* background_compiler_; | |
800 | 798 |
801 CompilerStats* compiler_stats_; | 799 CompilerStats* compiler_stats_; |
802 | 800 |
803 bool is_service_isolate_; | 801 bool is_service_isolate_; |
804 | 802 |
805 // Status support. | 803 // Status support. |
806 char* stacktrace_; | 804 char* stacktrace_; |
807 intptr_t stack_frame_index_; | 805 intptr_t stack_frame_index_; |
808 | 806 |
809 // Timestamps of last operation via service. | 807 // Timestamps of last operation via service. |
810 int64_t last_allocationprofile_accumulator_reset_timestamp_; | 808 int64_t last_allocationprofile_accumulator_reset_timestamp_; |
811 int64_t last_allocationprofile_gc_timestamp_; | 809 int64_t last_allocationprofile_gc_timestamp_; |
812 | 810 |
813 // Ring buffer of objects assigned an id. | 811 // Ring buffer of objects assigned an id. |
814 ObjectIdRing* object_id_ring_; | 812 ObjectIdRing* object_id_ring_; |
815 | 813 |
816 // Trace buffer support. | 814 // Trace buffer support. |
817 TraceBuffer* trace_buffer_; | 815 TraceBuffer* trace_buffer_; |
818 | 816 |
819 IsolateProfilerData* profiler_data_; | 817 IsolateProfilerData* profiler_data_; |
820 Mutex profiler_data_mutex_; | 818 Mutex profiler_data_mutex_; |
821 | 819 |
822 VMTagCounters vm_tag_counters_; | 820 VMTagCounters vm_tag_counters_; |
823 RawGrowableObjectArray* tag_table_; | 821 RawGrowableObjectArray* tag_table_; |
824 | 822 |
| 823 RawGrowableObjectArray* deoptimized_code_array_; |
825 | 824 |
826 RawGrowableObjectArray* deoptimized_code_array_; | 825 // Background compilation. |
| 826 BackgroundCompiler* background_compiler_; |
827 RawGrowableObjectArray* background_compilation_queue_; | 827 RawGrowableObjectArray* background_compilation_queue_; |
828 | 828 |
829 // We use 6 list entries for each pending service extension calls. | 829 // We use 6 list entries for each pending service extension calls. |
830 enum { | 830 enum { |
831 kPendingHandlerIndex = 0, | 831 kPendingHandlerIndex = 0, |
832 kPendingMethodNameIndex, | 832 kPendingMethodNameIndex, |
833 kPendingKeysIndex, | 833 kPendingKeysIndex, |
834 kPendingValuesIndex, | 834 kPendingValuesIndex, |
835 kPendingReplyPortIndex, | 835 kPendingReplyPortIndex, |
836 kPendingIdIndex, | 836 kPendingIdIndex, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 uint8_t* serialized_message_; | 1046 uint8_t* serialized_message_; |
1047 intptr_t serialized_message_len_; | 1047 intptr_t serialized_message_len_; |
1048 Isolate::Flags isolate_flags_; | 1048 Isolate::Flags isolate_flags_; |
1049 bool paused_; | 1049 bool paused_; |
1050 bool errors_are_fatal_; | 1050 bool errors_are_fatal_; |
1051 }; | 1051 }; |
1052 | 1052 |
1053 } // namespace dart | 1053 } // namespace dart |
1054 | 1054 |
1055 #endif // VM_ISOLATE_H_ | 1055 #endif // VM_ISOLATE_H_ |
OLD | NEW |