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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 gc_epilogue_callback_ = callback; | 423 gc_epilogue_callback_ = callback; |
424 } | 424 } |
425 | 425 |
426 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { | 426 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { |
427 create_callback_ = cb; | 427 create_callback_ = cb; |
428 } | 428 } |
429 static Dart_IsolateCreateCallback CreateCallback() { | 429 static Dart_IsolateCreateCallback CreateCallback() { |
430 return create_callback_; | 430 return create_callback_; |
431 } | 431 } |
432 | 432 |
433 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { | |
434 interrupt_callback_ = cb; | |
435 } | |
436 static Dart_IsolateInterruptCallback InterruptCallback() { | |
437 return interrupt_callback_; | |
438 } | |
439 | |
440 static void SetUnhandledExceptionCallback( | |
441 Dart_IsolateUnhandledExceptionCallback cb) { | |
442 unhandled_exception_callback_ = cb; | |
443 } | |
444 static Dart_IsolateUnhandledExceptionCallback UnhandledExceptionCallback() { | |
445 return unhandled_exception_callback_; | |
446 } | |
447 | |
448 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { | 433 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { |
449 shutdown_callback_ = cb; | 434 shutdown_callback_ = cb; |
450 } | 435 } |
451 static Dart_IsolateShutdownCallback ShutdownCallback() { | 436 static Dart_IsolateShutdownCallback ShutdownCallback() { |
452 return shutdown_callback_; | 437 return shutdown_callback_; |
453 } | 438 } |
454 | 439 |
455 static void SetFileCallbacks(Dart_FileOpenCallback file_open, | 440 static void SetFileCallbacks(Dart_FileOpenCallback file_open, |
456 Dart_FileReadCallback file_read, | 441 Dart_FileReadCallback file_read, |
457 Dart_FileWriteCallback file_write, | 442 Dart_FileWriteCallback file_write, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 type metric_##variable##_; | 827 type metric_##variable##_; |
843 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); | 828 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
844 #undef ISOLATE_METRIC_VARIABLE | 829 #undef ISOLATE_METRIC_VARIABLE |
845 | 830 |
846 #define ISOLATE_TIMELINE_STREAM_VARIABLE(name, not_used) \ | 831 #define ISOLATE_TIMELINE_STREAM_VARIABLE(name, not_used) \ |
847 TimelineStream stream_##name##_; | 832 TimelineStream stream_##name##_; |
848 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE) | 833 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE) |
849 #undef ISOLATE_TIMELINE_STREAM_VARIABLE | 834 #undef ISOLATE_TIMELINE_STREAM_VARIABLE |
850 | 835 |
851 static Dart_IsolateCreateCallback create_callback_; | 836 static Dart_IsolateCreateCallback create_callback_; |
852 static Dart_IsolateInterruptCallback interrupt_callback_; | |
853 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; | |
854 static Dart_IsolateShutdownCallback shutdown_callback_; | 837 static Dart_IsolateShutdownCallback shutdown_callback_; |
855 static Dart_FileOpenCallback file_open_callback_; | 838 static Dart_FileOpenCallback file_open_callback_; |
856 static Dart_FileReadCallback file_read_callback_; | 839 static Dart_FileReadCallback file_read_callback_; |
857 static Dart_FileWriteCallback file_write_callback_; | 840 static Dart_FileWriteCallback file_write_callback_; |
858 static Dart_FileCloseCallback file_close_callback_; | 841 static Dart_FileCloseCallback file_close_callback_; |
859 static Dart_EntropySource entropy_source_callback_; | 842 static Dart_EntropySource entropy_source_callback_; |
860 static Dart_IsolateInterruptCallback vmstats_callback_; | 843 static Dart_IsolateInterruptCallback vmstats_callback_; |
861 | 844 |
862 static void WakePauseEventHandler(Dart_Isolate isolate); | 845 static void WakePauseEventHandler(Dart_Isolate isolate); |
863 | 846 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 uint8_t* serialized_message_; | 975 uint8_t* serialized_message_; |
993 intptr_t serialized_message_len_; | 976 intptr_t serialized_message_len_; |
994 Isolate::Flags isolate_flags_; | 977 Isolate::Flags isolate_flags_; |
995 bool paused_; | 978 bool paused_; |
996 bool errors_are_fatal_; | 979 bool errors_are_fatal_; |
997 }; | 980 }; |
998 | 981 |
999 } // namespace dart | 982 } // namespace dart |
1000 | 983 |
1001 #endif // VM_ISOLATE_H_ | 984 #endif // VM_ISOLATE_H_ |
OLD | NEW |