| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 const Instance& id); | 648 const Instance& id); |
| 649 void RegisterServiceExtensionHandler(const String& name, | 649 void RegisterServiceExtensionHandler(const String& name, |
| 650 const Instance& closure); | 650 const Instance& closure); |
| 651 RawInstance* LookupServiceExtensionHandler(const String& name); | 651 RawInstance* LookupServiceExtensionHandler(const String& name); |
| 652 | 652 |
| 653 static void VisitIsolates(IsolateVisitor* visitor); | 653 static void VisitIsolates(IsolateVisitor* visitor); |
| 654 | 654 |
| 655 // Handle service messages until we are told to resume execution. | 655 // Handle service messages until we are told to resume execution. |
| 656 void PauseEventHandler(); | 656 void PauseEventHandler(); |
| 657 | 657 |
| 658 // DEPRECATED: Use Thread's methods instead. During migration, these default | |
| 659 // to using the mutator thread (which must also be the current thread). | |
| 660 Zone* current_zone() const { | |
| 661 ASSERT(Thread::Current() == mutator_thread_); | |
| 662 return mutator_thread_->zone(); | |
| 663 } | |
| 664 void set_current_zone(Zone* zone) { | |
| 665 ASSERT(Thread::Current() == mutator_thread_); | |
| 666 mutator_thread_->set_zone(zone); | |
| 667 } | |
| 668 | |
| 669 bool is_service_isolate() const { return is_service_isolate_; } | 658 bool is_service_isolate() const { return is_service_isolate_; } |
| 670 | 659 |
| 671 static void KillAllIsolates(LibMsgId msg_id); | 660 static void KillAllIsolates(LibMsgId msg_id); |
| 672 static void KillIfExists(Isolate* isolate, LibMsgId msg_id); | 661 static void KillIfExists(Isolate* isolate, LibMsgId msg_id); |
| 673 | 662 |
| 674 static void DisableIsolateCreation(); | 663 static void DisableIsolateCreation(); |
| 675 static void EnableIsolateCreation(); | 664 static void EnableIsolateCreation(); |
| 676 | 665 |
| 677 private: | 666 private: |
| 678 friend class Dart; // Init, InitOnce, Shutdown. | 667 friend class Dart; // Init, InitOnce, Shutdown. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 } | 711 } |
| 723 void MakeCurrentThreadMutator(Thread* thread) { | 712 void MakeCurrentThreadMutator(Thread* thread) { |
| 724 ASSERT(thread == Thread::Current()); | 713 ASSERT(thread == Thread::Current()); |
| 725 DEBUG_ASSERT(IsIsolateOf(thread)); | 714 DEBUG_ASSERT(IsIsolateOf(thread)); |
| 726 mutator_thread_ = thread; | 715 mutator_thread_ = thread; |
| 727 } | 716 } |
| 728 #if defined(DEBUG) | 717 #if defined(DEBUG) |
| 729 bool IsIsolateOf(Thread* thread); | 718 bool IsIsolateOf(Thread* thread); |
| 730 #endif // DEBUG | 719 #endif // DEBUG |
| 731 | 720 |
| 721 // DEPRECATED: Use Thread's methods instead. During migration, these default |
| 722 // to using the mutator thread (which must also be the current thread). |
| 723 Zone* current_zone() const { |
| 724 ASSERT(Thread::Current() == mutator_thread_); |
| 725 return mutator_thread_->zone(); |
| 726 } |
| 727 |
| 732 // Accessed from generated code: | 728 // Accessed from generated code: |
| 733 uword stack_limit_; | 729 uword stack_limit_; |
| 734 StoreBuffer* store_buffer_; | 730 StoreBuffer* store_buffer_; |
| 735 Heap* heap_; | 731 Heap* heap_; |
| 736 uword user_tag_; | 732 uword user_tag_; |
| 737 RawUserTag* current_tag_; | 733 RawUserTag* current_tag_; |
| 738 RawUserTag* default_tag_; | 734 RawUserTag* default_tag_; |
| 739 ClassTable class_table_; | 735 ClassTable class_table_; |
| 740 bool single_step_; | 736 bool single_step_; |
| 741 | 737 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 uint8_t* serialized_message_; | 1021 uint8_t* serialized_message_; |
| 1026 intptr_t serialized_message_len_; | 1022 intptr_t serialized_message_len_; |
| 1027 Isolate::Flags isolate_flags_; | 1023 Isolate::Flags isolate_flags_; |
| 1028 bool paused_; | 1024 bool paused_; |
| 1029 bool errors_are_fatal_; | 1025 bool errors_are_fatal_; |
| 1030 }; | 1026 }; |
| 1031 | 1027 |
| 1032 } // namespace dart | 1028 } // namespace dart |
| 1033 | 1029 |
| 1034 #endif // VM_ISOLATE_H_ | 1030 #endif // VM_ISOLATE_H_ |
| OLD | NEW |