| 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 return deoptimized_code_array_; | 700 return deoptimized_code_array_; |
| 701 } | 701 } |
| 702 void set_deoptimized_code_array(const GrowableObjectArray& value); | 702 void set_deoptimized_code_array(const GrowableObjectArray& value); |
| 703 void TrackDeoptimizedCode(const Code& code); | 703 void TrackDeoptimizedCode(const Code& code); |
| 704 | 704 |
| 705 bool compilation_allowed() const { return compilation_allowed_; } | 705 bool compilation_allowed() const { return compilation_allowed_; } |
| 706 void set_compilation_allowed(bool allowed) { | 706 void set_compilation_allowed(bool allowed) { |
| 707 compilation_allowed_ = allowed; | 707 compilation_allowed_ = allowed; |
| 708 } | 708 } |
| 709 | 709 |
| 710 RawObject* InvokePendingServiceExtensionCalls(); |
| 711 void AppendServiceExtensionCall(const Instance& closure, |
| 712 const String& method_name, |
| 713 const Array& parameter_keys, |
| 714 const Array& parameter_values, |
| 715 const Instance& reply_port, |
| 716 const Instance& id); |
| 717 void RegisterServiceExtensionHandler(const String& name, |
| 718 const Instance& closure); |
| 719 RawInstance* LookupServiceExtensionHandler(const String& name); |
| 720 |
| 710 #if defined(DEBUG) | 721 #if defined(DEBUG) |
| 711 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 722 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
| 712 void set_reusable_##object##_handle_scope_active(bool value) { \ | 723 void set_reusable_##object##_handle_scope_active(bool value) { \ |
| 713 reusable_##object##_handle_scope_active_ = value; \ | 724 reusable_##object##_handle_scope_active_ = value; \ |
| 714 } \ | 725 } \ |
| 715 bool reusable_##object##_handle_scope_active() const { \ | 726 bool reusable_##object##_handle_scope_active() const { \ |
| 716 return reusable_##object##_handle_scope_active_; \ | 727 return reusable_##object##_handle_scope_active_; \ |
| 717 } | 728 } |
| 718 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) | 729 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) |
| 719 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS | 730 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 // Visit all object pointers. Caller must ensure concurrent sweeper is not | 774 // Visit all object pointers. Caller must ensure concurrent sweeper is not |
| 764 // running, and the visitor must not allocate. | 775 // running, and the visitor must not allocate. |
| 765 void VisitObjectPointers(ObjectPointerVisitor* visitor, | 776 void VisitObjectPointers(ObjectPointerVisitor* visitor, |
| 766 bool visit_prologue_weak_persistent_handles, | 777 bool visit_prologue_weak_persistent_handles, |
| 767 bool validate_frames); | 778 bool validate_frames); |
| 768 | 779 |
| 769 void set_user_tag(uword tag) { | 780 void set_user_tag(uword tag) { |
| 770 user_tag_ = tag; | 781 user_tag_ = tag; |
| 771 } | 782 } |
| 772 | 783 |
| 784 RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls(); |
| 785 RawGrowableObjectArray* pending_service_extension_calls() const { |
| 786 return pending_service_extension_calls_; |
| 787 } |
| 788 void set_pending_service_extension_calls(const GrowableObjectArray& value); |
| 789 RawGrowableObjectArray* registered_service_extension_handlers() const { |
| 790 return registered_service_extension_handlers_; |
| 791 } |
| 792 void set_registered_service_extension_handlers( |
| 793 const GrowableObjectArray& value); |
| 794 |
| 773 void ClearMutatorThread() { | 795 void ClearMutatorThread() { |
| 774 mutator_thread_ = NULL; | 796 mutator_thread_ = NULL; |
| 775 } | 797 } |
| 776 void MakeCurrentThreadMutator(Thread* thread) { | 798 void MakeCurrentThreadMutator(Thread* thread) { |
| 777 ASSERT(thread == Thread::Current()); | 799 ASSERT(thread == Thread::Current()); |
| 778 DEBUG_ASSERT(IsIsolateOf(thread)); | 800 DEBUG_ASSERT(IsIsolateOf(thread)); |
| 779 mutator_thread_ = thread; | 801 mutator_thread_ = thread; |
| 780 } | 802 } |
| 781 #if defined(DEBUG) | 803 #if defined(DEBUG) |
| 782 bool IsIsolateOf(Thread* thread); | 804 bool IsIsolateOf(Thread* thread); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 | 877 |
| 856 VMTagCounters vm_tag_counters_; | 878 VMTagCounters vm_tag_counters_; |
| 857 uword user_tag_; | 879 uword user_tag_; |
| 858 RawGrowableObjectArray* tag_table_; | 880 RawGrowableObjectArray* tag_table_; |
| 859 RawUserTag* current_tag_; | 881 RawUserTag* current_tag_; |
| 860 RawUserTag* default_tag_; | 882 RawUserTag* default_tag_; |
| 861 | 883 |
| 862 RawGrowableObjectArray* collected_closures_; | 884 RawGrowableObjectArray* collected_closures_; |
| 863 RawGrowableObjectArray* deoptimized_code_array_; | 885 RawGrowableObjectArray* deoptimized_code_array_; |
| 864 | 886 |
| 887 // We use 6 list entries for each pending service extension calls. |
| 888 enum { |
| 889 kPendingHandlerIndex = 0, |
| 890 kPendingMethodNameIndex, |
| 891 kPendingKeysIndex, |
| 892 kPendingValuesIndex, |
| 893 kPendingReplyPortIndex, |
| 894 kPendingIdIndex, |
| 895 kPendingEntrySize |
| 896 }; |
| 897 RawGrowableObjectArray* pending_service_extension_calls_; |
| 898 |
| 899 // We use 2 list entries for each registered extension handler. |
| 900 enum { |
| 901 kRegisteredNameIndex = 0, |
| 902 kRegisteredHandlerIndex, |
| 903 kRegisteredEntrySize |
| 904 }; |
| 905 RawGrowableObjectArray* registered_service_extension_handlers_; |
| 906 |
| 865 Metric* metrics_list_head_; | 907 Metric* metrics_list_head_; |
| 866 | 908 |
| 867 Counters counters_; | 909 Counters counters_; |
| 868 | 910 |
| 869 bool compilation_allowed_; | 911 bool compilation_allowed_; |
| 870 | 912 |
| 871 // TODO(23153): Move this out of Isolate/Thread. | 913 // TODO(23153): Move this out of Isolate/Thread. |
| 872 CHA* cha_; | 914 CHA* cha_; |
| 873 | 915 |
| 874 // Isolate list next pointer. | 916 // Isolate list next pointer. |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 uint8_t* serialized_message_; | 1117 uint8_t* serialized_message_; |
| 1076 intptr_t serialized_message_len_; | 1118 intptr_t serialized_message_len_; |
| 1077 Isolate::Flags isolate_flags_; | 1119 Isolate::Flags isolate_flags_; |
| 1078 bool paused_; | 1120 bool paused_; |
| 1079 bool errors_are_fatal_; | 1121 bool errors_are_fatal_; |
| 1080 }; | 1122 }; |
| 1081 | 1123 |
| 1082 } // namespace dart | 1124 } // namespace dart |
| 1083 | 1125 |
| 1084 #endif // VM_ISOLATE_H_ | 1126 #endif // VM_ISOLATE_H_ |
| OLD | NEW |