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 "platform/thread.h" | 10 #include "platform/thread.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return message_notify_callback_; | 138 return message_notify_callback_; |
139 } | 139 } |
140 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 140 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
141 message_notify_callback_ = value; | 141 message_notify_callback_ = value; |
142 } | 142 } |
143 | 143 |
144 const char* name() const { return name_; } | 144 const char* name() const { return name_; } |
145 | 145 |
146 int64_t start_time() const { return start_time_; } | 146 int64_t start_time() const { return start_time_; } |
147 | 147 |
| 148 // Creates the pin port (responsible for stopping the isolate from being |
| 149 // destroyed). |
| 150 void CreatePinPort(); |
| 151 // Closes pin port. |
| 152 void ClosePinPort(); |
| 153 |
148 Dart_Port main_port() { return main_port_; } | 154 Dart_Port main_port() { return main_port_; } |
149 void set_main_port(Dart_Port port) { | 155 void set_main_port(Dart_Port port) { |
150 ASSERT(main_port_ == 0); // Only set main port once. | 156 ASSERT(main_port_ == 0); // Only set main port once. |
151 main_port_ = port; | 157 main_port_ = port; |
152 } | 158 } |
153 | 159 |
154 Heap* heap() const { return heap_; } | 160 Heap* heap() const { return heap_; } |
155 void set_heap(Heap* value) { heap_ = value; } | 161 void set_heap(Heap* value) { heap_ = value; } |
156 static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); } | 162 static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); } |
157 | 163 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 template<class T> T* AllocateReusableHandle(); | 451 template<class T> T* AllocateReusableHandle(); |
446 | 452 |
447 static ThreadLocalKey isolate_key; | 453 static ThreadLocalKey isolate_key; |
448 | 454 |
449 StoreBuffer store_buffer_; | 455 StoreBuffer store_buffer_; |
450 ClassTable class_table_; | 456 ClassTable class_table_; |
451 MegamorphicCacheTable megamorphic_cache_table_; | 457 MegamorphicCacheTable megamorphic_cache_table_; |
452 Dart_MessageNotifyCallback message_notify_callback_; | 458 Dart_MessageNotifyCallback message_notify_callback_; |
453 char* name_; | 459 char* name_; |
454 int64_t start_time_; | 460 int64_t start_time_; |
| 461 Dart_Port pin_port_; |
455 Dart_Port main_port_; | 462 Dart_Port main_port_; |
456 Heap* heap_; | 463 Heap* heap_; |
457 ObjectStore* object_store_; | 464 ObjectStore* object_store_; |
458 RawContext* top_context_; | 465 RawContext* top_context_; |
459 uword top_exit_frame_info_; | 466 uword top_exit_frame_info_; |
460 void* init_callback_data_; | 467 void* init_callback_data_; |
461 Dart_EnvironmentCallback environment_callback_; | 468 Dart_EnvironmentCallback environment_callback_; |
462 Dart_LibraryTagHandler library_tag_handler_; | 469 Dart_LibraryTagHandler library_tag_handler_; |
463 ApiState* api_state_; | 470 ApiState* api_state_; |
464 StubCode* stub_code_; | 471 StubCode* stub_code_; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 char* script_url_; | 626 char* script_url_; |
620 char* library_url_; | 627 char* library_url_; |
621 char* class_name_; | 628 char* class_name_; |
622 char* function_name_; | 629 char* function_name_; |
623 char* exception_callback_name_; | 630 char* exception_callback_name_; |
624 }; | 631 }; |
625 | 632 |
626 } // namespace dart | 633 } // namespace dart |
627 | 634 |
628 #endif // VM_ISOLATE_H_ | 635 #endif // VM_ISOLATE_H_ |
OLD | NEW |