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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 gc_epilogue_callback_ = callback; | 401 gc_epilogue_callback_ = callback; |
402 } | 402 } |
403 | 403 |
404 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { | 404 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { |
405 create_callback_ = cb; | 405 create_callback_ = cb; |
406 } | 406 } |
407 static Dart_IsolateCreateCallback CreateCallback() { | 407 static Dart_IsolateCreateCallback CreateCallback() { |
408 return create_callback_; | 408 return create_callback_; |
409 } | 409 } |
410 | 410 |
411 static void SetServiceCreateCallback(Dart_ServiceIsolateCreateCalback cb) { | |
412 service_create_callback_ = cb; | |
413 } | |
414 static Dart_ServiceIsolateCreateCalback ServiceCreateCallback() { | |
415 return service_create_callback_; | |
416 } | |
417 | |
418 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { | 411 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { |
419 interrupt_callback_ = cb; | 412 interrupt_callback_ = cb; |
420 } | 413 } |
421 static Dart_IsolateInterruptCallback InterruptCallback() { | 414 static Dart_IsolateInterruptCallback InterruptCallback() { |
422 return interrupt_callback_; | 415 return interrupt_callback_; |
423 } | 416 } |
424 | 417 |
425 static void SetVmStatsCallback(Dart_IsolateInterruptCallback cb) { | 418 static void SetVmStatsCallback(Dart_IsolateInterruptCallback cb) { |
426 vmstats_callback_ = cb; | 419 vmstats_callback_ = cb; |
427 } | 420 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 static Dart_IsolateCreateCallback create_callback_; | 724 static Dart_IsolateCreateCallback create_callback_; |
732 static Dart_IsolateInterruptCallback interrupt_callback_; | 725 static Dart_IsolateInterruptCallback interrupt_callback_; |
733 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; | 726 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; |
734 static Dart_IsolateShutdownCallback shutdown_callback_; | 727 static Dart_IsolateShutdownCallback shutdown_callback_; |
735 static Dart_FileOpenCallback file_open_callback_; | 728 static Dart_FileOpenCallback file_open_callback_; |
736 static Dart_FileReadCallback file_read_callback_; | 729 static Dart_FileReadCallback file_read_callback_; |
737 static Dart_FileWriteCallback file_write_callback_; | 730 static Dart_FileWriteCallback file_write_callback_; |
738 static Dart_FileCloseCallback file_close_callback_; | 731 static Dart_FileCloseCallback file_close_callback_; |
739 static Dart_EntropySource entropy_source_callback_; | 732 static Dart_EntropySource entropy_source_callback_; |
740 static Dart_IsolateInterruptCallback vmstats_callback_; | 733 static Dart_IsolateInterruptCallback vmstats_callback_; |
741 static Dart_ServiceIsolateCreateCalback service_create_callback_; | |
742 | 734 |
743 // Manage list of existing isolates. | 735 // Manage list of existing isolates. |
744 static void AddIsolateTolist(Isolate* isolate); | 736 static void AddIsolateTolist(Isolate* isolate); |
745 static void RemoveIsolateFromList(Isolate* isolate); | 737 static void RemoveIsolateFromList(Isolate* isolate); |
746 static void CheckForDuplicateThreadState(InterruptableThreadState* state); | 738 static void CheckForDuplicateThreadState(InterruptableThreadState* state); |
747 static Monitor* isolates_list_monitor_; | 739 static Monitor* isolates_list_monitor_; |
748 static Isolate* isolates_list_head_; | 740 static Isolate* isolates_list_head_; |
749 | 741 |
750 #define REUSABLE_FRIEND_DECLARATION(name) \ | 742 #define REUSABLE_FRIEND_DECLARATION(name) \ |
751 friend class Reusable##name##HandleScope; | 743 friend class Reusable##name##HandleScope; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 uint8_t* serialized_args_; | 862 uint8_t* serialized_args_; |
871 intptr_t serialized_args_len_; | 863 intptr_t serialized_args_len_; |
872 uint8_t* serialized_message_; | 864 uint8_t* serialized_message_; |
873 intptr_t serialized_message_len_; | 865 intptr_t serialized_message_len_; |
874 bool paused_; | 866 bool paused_; |
875 }; | 867 }; |
876 | 868 |
877 } // namespace dart | 869 } // namespace dart |
878 | 870 |
879 #endif // VM_ISOLATE_H_ | 871 #endif // VM_ISOLATE_H_ |
OLD | NEW |