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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 class RawDouble; | 67 class RawDouble; |
68 class RawGrowableObjectArray; | 68 class RawGrowableObjectArray; |
69 class RawMint; | 69 class RawMint; |
70 class RawObject; | 70 class RawObject; |
71 class RawInteger; | 71 class RawInteger; |
72 class RawError; | 72 class RawError; |
73 class RawFloat32x4; | 73 class RawFloat32x4; |
74 class RawInt32x4; | 74 class RawInt32x4; |
75 class RawUserTag; | 75 class RawUserTag; |
76 class SampleBuffer; | 76 class SampleBuffer; |
| 77 class SendPort; |
77 class Simulator; | 78 class Simulator; |
78 class StackResource; | 79 class StackResource; |
79 class StackZone; | 80 class StackZone; |
80 class StubCode; | 81 class StubCode; |
81 class TypeArguments; | 82 class TypeArguments; |
82 class TypeParameter; | 83 class TypeParameter; |
83 class UserTag; | 84 class UserTag; |
84 | 85 |
85 | 86 |
86 class IsolateVisitor { | 87 class IsolateVisitor { |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // Verify that the sender has the capability to pause or terminate the | 404 // Verify that the sender has the capability to pause or terminate the |
404 // isolate. | 405 // isolate. |
405 bool VerifyPauseCapability(const Object& capability) const; | 406 bool VerifyPauseCapability(const Object& capability) const; |
406 bool VerifyTerminateCapability(const Object& capability) const; | 407 bool VerifyTerminateCapability(const Object& capability) const; |
407 | 408 |
408 // Returns true if the capability was added or removed from this isolate's | 409 // Returns true if the capability was added or removed from this isolate's |
409 // list of pause events. | 410 // list of pause events. |
410 bool AddResumeCapability(const Capability& capability); | 411 bool AddResumeCapability(const Capability& capability); |
411 bool RemoveResumeCapability(const Capability& capability); | 412 bool RemoveResumeCapability(const Capability& capability); |
412 | 413 |
| 414 void AddExitListener(const SendPort& listener); |
| 415 void RemoveExitListener(const SendPort& listener); |
| 416 void NotifyExitListeners(); |
| 417 |
| 418 void AddErrorListener(const SendPort& listener); |
| 419 void RemoveErrorListener(const SendPort& listener); |
| 420 void NotifyErrorListeners(const String& msg, const String& stacktrace); |
| 421 |
| 422 bool ErrorsFatal() const { return errors_fatal_; } |
| 423 void SetErrorsFatal(bool val) { errors_fatal_ = val; } |
| 424 |
413 Random* random() { return &random_; } | 425 Random* random() { return &random_; } |
414 | 426 |
415 Simulator* simulator() const { return simulator_; } | 427 Simulator* simulator() const { return simulator_; } |
416 void set_simulator(Simulator* value) { simulator_ = value; } | 428 void set_simulator(Simulator* value) { simulator_ = value; } |
417 | 429 |
418 Dart_GcPrologueCallback gc_prologue_callback() const { | 430 Dart_GcPrologueCallback gc_prologue_callback() const { |
419 return gc_prologue_callback_; | 431 return gc_prologue_callback_; |
420 } | 432 } |
421 | 433 |
422 void set_gc_prologue_callback(Dart_GcPrologueCallback callback) { | 434 void set_gc_prologue_callback(Dart_GcPrologueCallback callback) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 StoreBuffer store_buffer_; | 679 StoreBuffer store_buffer_; |
668 ClassTable class_table_; | 680 ClassTable class_table_; |
669 MegamorphicCacheTable megamorphic_cache_table_; | 681 MegamorphicCacheTable megamorphic_cache_table_; |
670 Dart_MessageNotifyCallback message_notify_callback_; | 682 Dart_MessageNotifyCallback message_notify_callback_; |
671 char* name_; | 683 char* name_; |
672 int64_t start_time_; | 684 int64_t start_time_; |
673 Dart_Port main_port_; | 685 Dart_Port main_port_; |
674 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 686 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
675 uint64_t pause_capability_; | 687 uint64_t pause_capability_; |
676 uint64_t terminate_capability_; | 688 uint64_t terminate_capability_; |
| 689 bool errors_fatal_; |
677 Heap* heap_; | 690 Heap* heap_; |
678 ObjectStore* object_store_; | 691 ObjectStore* object_store_; |
679 uword top_exit_frame_info_; | 692 uword top_exit_frame_info_; |
680 void* init_callback_data_; | 693 void* init_callback_data_; |
681 Dart_EnvironmentCallback environment_callback_; | 694 Dart_EnvironmentCallback environment_callback_; |
682 Dart_LibraryTagHandler library_tag_handler_; | 695 Dart_LibraryTagHandler library_tag_handler_; |
683 ApiState* api_state_; | 696 ApiState* api_state_; |
684 StubCode* stub_code_; | 697 StubCode* stub_code_; |
685 Debugger* debugger_; | 698 Debugger* debugger_; |
686 bool single_step_; | 699 bool single_step_; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 uint8_t* serialized_args_; | 921 uint8_t* serialized_args_; |
909 intptr_t serialized_args_len_; | 922 intptr_t serialized_args_len_; |
910 uint8_t* serialized_message_; | 923 uint8_t* serialized_message_; |
911 intptr_t serialized_message_len_; | 924 intptr_t serialized_message_len_; |
912 bool paused_; | 925 bool paused_; |
913 }; | 926 }; |
914 | 927 |
915 } // namespace dart | 928 } // namespace dart |
916 | 929 |
917 #endif // VM_ISOLATE_H_ | 930 #endif // VM_ISOLATE_H_ |
OLD | NEW |