| 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/base_isolate.h" | 10 #include "vm/base_isolate.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 class GrowableObjectArray; | 45 class GrowableObjectArray; |
| 46 class HandleScope; | 46 class HandleScope; |
| 47 class HandleVisitor; | 47 class HandleVisitor; |
| 48 class Heap; | 48 class Heap; |
| 49 class ICData; | 49 class ICData; |
| 50 class Instance; | 50 class Instance; |
| 51 class IsolateProfilerData; | 51 class IsolateProfilerData; |
| 52 class IsolateSpawnState; | 52 class IsolateSpawnState; |
| 53 class InterruptableThreadState; | 53 class InterruptableThreadState; |
| 54 class Library; | 54 class Library; |
| 55 class Log; |
| 55 class LongJumpScope; | 56 class LongJumpScope; |
| 56 class MessageHandler; | 57 class MessageHandler; |
| 57 class Mutex; | 58 class Mutex; |
| 58 class Object; | 59 class Object; |
| 59 class ObjectIdRing; | 60 class ObjectIdRing; |
| 60 class ObjectPointerVisitor; | 61 class ObjectPointerVisitor; |
| 61 class ObjectStore; | 62 class ObjectStore; |
| 62 class PcDescriptors; | 63 class PcDescriptors; |
| 63 class RawInstance; | 64 class RawInstance; |
| 64 class RawArray; | 65 class RawArray; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 161 } |
| 161 | 162 |
| 162 Dart_MessageNotifyCallback message_notify_callback() const { | 163 Dart_MessageNotifyCallback message_notify_callback() const { |
| 163 return message_notify_callback_; | 164 return message_notify_callback_; |
| 164 } | 165 } |
| 165 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 166 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
| 166 message_notify_callback_ = value; | 167 message_notify_callback_ = value; |
| 167 } | 168 } |
| 168 | 169 |
| 169 const char* name() const { return name_; } | 170 const char* name() const { return name_; } |
| 171 class Log* Log() const; |
| 170 | 172 |
| 171 int64_t start_time() const { return start_time_; } | 173 int64_t start_time() const { return start_time_; } |
| 172 | 174 |
| 173 Dart_Port main_port() const { return main_port_; } | 175 Dart_Port main_port() const { return main_port_; } |
| 174 void set_main_port(Dart_Port port) { | 176 void set_main_port(Dart_Port port) { |
| 175 ASSERT(main_port_ == 0); // Only set main port once. | 177 ASSERT(main_port_ == 0); // Only set main port once. |
| 176 main_port_ = port; | 178 main_port_ = port; |
| 177 } | 179 } |
| 178 Dart_Port origin_id() const { return origin_id_; } | 180 Dart_Port origin_id() const { return origin_id_; } |
| 179 void set_origin_id(Dart_Port id) { | 181 void set_origin_id(Dart_Port id) { |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 uword stack_overflow_flags_; | 688 uword stack_overflow_flags_; |
| 687 int32_t stack_overflow_count_; | 689 int32_t stack_overflow_count_; |
| 688 MessageHandler* message_handler_; | 690 MessageHandler* message_handler_; |
| 689 IsolateSpawnState* spawn_state_; | 691 IsolateSpawnState* spawn_state_; |
| 690 bool is_runnable_; | 692 bool is_runnable_; |
| 691 Dart_GcPrologueCallback gc_prologue_callback_; | 693 Dart_GcPrologueCallback gc_prologue_callback_; |
| 692 Dart_GcEpilogueCallback gc_epilogue_callback_; | 694 Dart_GcEpilogueCallback gc_epilogue_callback_; |
| 693 intptr_t defer_finalization_count_; | 695 intptr_t defer_finalization_count_; |
| 694 DeoptContext* deopt_context_; | 696 DeoptContext* deopt_context_; |
| 695 | 697 |
| 698 // Log. |
| 699 bool is_service_isolate_; |
| 700 class Log* log_; |
| 701 |
| 696 // Status support. | 702 // Status support. |
| 697 char* stacktrace_; | 703 char* stacktrace_; |
| 698 intptr_t stack_frame_index_; | 704 intptr_t stack_frame_index_; |
| 699 | 705 |
| 700 // Timestamps of last operation via service. | 706 // Timestamps of last operation via service. |
| 701 int64_t last_allocationprofile_accumulator_reset_timestamp_; | 707 int64_t last_allocationprofile_accumulator_reset_timestamp_; |
| 702 int64_t last_allocationprofile_gc_timestamp_; | 708 int64_t last_allocationprofile_gc_timestamp_; |
| 703 | 709 |
| 704 CHA* cha_; | 710 CHA* cha_; |
| 705 | 711 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 static void RemoveIsolateFromList(Isolate* isolate); | 768 static void RemoveIsolateFromList(Isolate* isolate); |
| 763 static void CheckForDuplicateThreadState(InterruptableThreadState* state); | 769 static void CheckForDuplicateThreadState(InterruptableThreadState* state); |
| 764 static Monitor* isolates_list_monitor_; | 770 static Monitor* isolates_list_monitor_; |
| 765 static Isolate* isolates_list_head_; | 771 static Isolate* isolates_list_head_; |
| 766 | 772 |
| 767 #define REUSABLE_FRIEND_DECLARATION(name) \ | 773 #define REUSABLE_FRIEND_DECLARATION(name) \ |
| 768 friend class Reusable##name##HandleScope; | 774 friend class Reusable##name##HandleScope; |
| 769 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) | 775 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
| 770 #undef REUSABLE_FRIEND_DECLARATION | 776 #undef REUSABLE_FRIEND_DECLARATION |
| 771 | 777 |
| 778 friend class Service; |
| 779 |
| 772 DISALLOW_COPY_AND_ASSIGN(Isolate); | 780 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| 773 }; | 781 }; |
| 774 | 782 |
| 775 | 783 |
| 776 // When we need to execute code in an isolate, we use the | 784 // When we need to execute code in an isolate, we use the |
| 777 // StartIsolateScope. | 785 // StartIsolateScope. |
| 778 class StartIsolateScope { | 786 class StartIsolateScope { |
| 779 public: | 787 public: |
| 780 explicit StartIsolateScope(Isolate* new_isolate) | 788 explicit StartIsolateScope(Isolate* new_isolate) |
| 781 : new_isolate_(new_isolate), saved_isolate_(Isolate::Current()) { | 789 : new_isolate_(new_isolate), saved_isolate_(Isolate::Current()) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 uint8_t* serialized_args_; | 895 uint8_t* serialized_args_; |
| 888 intptr_t serialized_args_len_; | 896 intptr_t serialized_args_len_; |
| 889 uint8_t* serialized_message_; | 897 uint8_t* serialized_message_; |
| 890 intptr_t serialized_message_len_; | 898 intptr_t serialized_message_len_; |
| 891 bool paused_; | 899 bool paused_; |
| 892 }; | 900 }; |
| 893 | 901 |
| 894 } // namespace dart | 902 } // namespace dart |
| 895 | 903 |
| 896 #endif // VM_ISOLATE_H_ | 904 #endif // VM_ISOLATE_H_ |
| OLD | NEW |