| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 | 163 |
| 164 Dart_MessageNotifyCallback message_notify_callback() const { | 164 Dart_MessageNotifyCallback message_notify_callback() const { |
| 165 return message_notify_callback_; | 165 return message_notify_callback_; |
| 166 } | 166 } |
| 167 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 167 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
| 168 message_notify_callback_ = value; | 168 message_notify_callback_ = value; |
| 169 } | 169 } |
| 170 | 170 |
| 171 const char* name() const { return name_; } | 171 const char* name() const { return name_; } |
| 172 const char* debugger_name() const { return debugger_name_; } |
| 173 void set_debugger_name(const char* name); |
| 172 class Log* Log() const; | 174 class Log* Log() const; |
| 173 | 175 |
| 174 int64_t start_time() const { return start_time_; } | 176 int64_t start_time() const { return start_time_; } |
| 175 | 177 |
| 176 Dart_Port main_port() const { return main_port_; } | 178 Dart_Port main_port() const { return main_port_; } |
| 177 void set_main_port(Dart_Port port) { | 179 void set_main_port(Dart_Port port) { |
| 178 ASSERT(main_port_ == 0); // Only set main port once. | 180 ASSERT(main_port_ == 0); // Only set main port once. |
| 179 main_port_ = port; | 181 main_port_ = port; |
| 180 } | 182 } |
| 181 Dart_Port origin_id() const { return origin_id_; } | 183 Dart_Port origin_id() const { return origin_id_; } |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 template<class T> T* AllocateReusableHandle(); | 667 template<class T> T* AllocateReusableHandle(); |
| 666 | 668 |
| 667 static ThreadLocalKey isolate_key; | 669 static ThreadLocalKey isolate_key; |
| 668 | 670 |
| 669 uword vm_tag_; | 671 uword vm_tag_; |
| 670 StoreBuffer store_buffer_; | 672 StoreBuffer store_buffer_; |
| 671 ClassTable class_table_; | 673 ClassTable class_table_; |
| 672 MegamorphicCacheTable megamorphic_cache_table_; | 674 MegamorphicCacheTable megamorphic_cache_table_; |
| 673 Dart_MessageNotifyCallback message_notify_callback_; | 675 Dart_MessageNotifyCallback message_notify_callback_; |
| 674 char* name_; | 676 char* name_; |
| 677 char* debugger_name_; |
| 675 int64_t start_time_; | 678 int64_t start_time_; |
| 676 Dart_Port main_port_; | 679 Dart_Port main_port_; |
| 677 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 680 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
| 678 uint64_t pause_capability_; | 681 uint64_t pause_capability_; |
| 679 uint64_t terminate_capability_; | 682 uint64_t terminate_capability_; |
| 680 bool errors_fatal_; | 683 bool errors_fatal_; |
| 681 Heap* heap_; | 684 Heap* heap_; |
| 682 ObjectStore* object_store_; | 685 ObjectStore* object_store_; |
| 683 uword top_exit_frame_info_; | 686 uword top_exit_frame_info_; |
| 684 void* init_callback_data_; | 687 void* init_callback_data_; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 static Dart_FileReadCallback file_read_callback_; | 779 static Dart_FileReadCallback file_read_callback_; |
| 777 static Dart_FileWriteCallback file_write_callback_; | 780 static Dart_FileWriteCallback file_write_callback_; |
| 778 static Dart_FileCloseCallback file_close_callback_; | 781 static Dart_FileCloseCallback file_close_callback_; |
| 779 static Dart_EntropySource entropy_source_callback_; | 782 static Dart_EntropySource entropy_source_callback_; |
| 780 static Dart_IsolateInterruptCallback vmstats_callback_; | 783 static Dart_IsolateInterruptCallback vmstats_callback_; |
| 781 | 784 |
| 782 // Manage list of existing isolates. | 785 // Manage list of existing isolates. |
| 783 static void AddIsolateTolist(Isolate* isolate); | 786 static void AddIsolateTolist(Isolate* isolate); |
| 784 static void RemoveIsolateFromList(Isolate* isolate); | 787 static void RemoveIsolateFromList(Isolate* isolate); |
| 785 static void CheckForDuplicateThreadState(InterruptableThreadState* state); | 788 static void CheckForDuplicateThreadState(InterruptableThreadState* state); |
| 786 static Monitor* isolates_list_monitor_; | 789 |
| 790 static Monitor* isolates_list_monitor_; // Protects isolates_list_head_ |
| 787 static Isolate* isolates_list_head_; | 791 static Isolate* isolates_list_head_; |
| 788 | 792 |
| 789 #define REUSABLE_FRIEND_DECLARATION(name) \ | 793 #define REUSABLE_FRIEND_DECLARATION(name) \ |
| 790 friend class Reusable##name##HandleScope; | 794 friend class Reusable##name##HandleScope; |
| 791 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) | 795 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
| 792 #undef REUSABLE_FRIEND_DECLARATION | 796 #undef REUSABLE_FRIEND_DECLARATION |
| 793 | 797 |
| 794 friend class ServiceIsolate; | 798 friend class ServiceIsolate; |
| 795 | 799 |
| 796 DISALLOW_COPY_AND_ASSIGN(Isolate); | 800 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 uint8_t* serialized_args_; | 916 uint8_t* serialized_args_; |
| 913 intptr_t serialized_args_len_; | 917 intptr_t serialized_args_len_; |
| 914 uint8_t* serialized_message_; | 918 uint8_t* serialized_message_; |
| 915 intptr_t serialized_message_len_; | 919 intptr_t serialized_message_len_; |
| 916 bool paused_; | 920 bool paused_; |
| 917 }; | 921 }; |
| 918 | 922 |
| 919 } // namespace dart | 923 } // namespace dart |
| 920 | 924 |
| 921 #endif // VM_ISOLATE_H_ | 925 #endif // VM_ISOLATE_H_ |
| OLD | NEW |