| 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" |
| 11 #include "vm/base_isolate.h" | 11 #include "vm/base_isolate.h" |
| 12 #include "vm/class_table.h" | 12 #include "vm/class_table.h" |
| 13 #include "vm/counters.h" | |
| 14 #include "vm/handles.h" | 13 #include "vm/handles.h" |
| 15 #include "vm/megamorphic_cache_table.h" | 14 #include "vm/megamorphic_cache_table.h" |
| 16 #include "vm/metrics.h" | 15 #include "vm/metrics.h" |
| 17 #include "vm/random.h" | 16 #include "vm/random.h" |
| 18 #include "vm/tags.h" | 17 #include "vm/tags.h" |
| 19 #include "vm/thread.h" | 18 #include "vm/thread.h" |
| 20 #include "vm/os_thread.h" | 19 #include "vm/os_thread.h" |
| 21 #include "vm/timeline.h" | 20 #include "vm/timeline.h" |
| 22 #include "vm/timer.h" | 21 #include "vm/timer.h" |
| 23 #include "vm/trace_buffer.h" | 22 #include "vm/trace_buffer.h" |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 728 |
| 730 #define REUSABLE_HANDLE(object) \ | 729 #define REUSABLE_HANDLE(object) \ |
| 731 object& object##Handle() const { \ | 730 object& object##Handle() const { \ |
| 732 return *object##_handle_; \ | 731 return *object##_handle_; \ |
| 733 } | 732 } |
| 734 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE) | 733 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE) |
| 735 #undef REUSABLE_HANDLE | 734 #undef REUSABLE_HANDLE |
| 736 | 735 |
| 737 static void VisitIsolates(IsolateVisitor* visitor); | 736 static void VisitIsolates(IsolateVisitor* visitor); |
| 738 | 737 |
| 739 Counters* counters() { return &counters_; } | |
| 740 | |
| 741 // Handle service messages until we are told to resume execution. | 738 // Handle service messages until we are told to resume execution. |
| 742 void PauseEventHandler(); | 739 void PauseEventHandler(); |
| 743 | 740 |
| 744 // DEPRECATED: Use Thread's methods instead. During migration, these default | 741 // DEPRECATED: Use Thread's methods instead. During migration, these default |
| 745 // to using the mutator thread (which must also be the current thread). | 742 // to using the mutator thread (which must also be the current thread). |
| 746 Zone* current_zone() const { | 743 Zone* current_zone() const { |
| 747 ASSERT(Thread::Current() == mutator_thread_); | 744 ASSERT(Thread::Current() == mutator_thread_); |
| 748 return mutator_thread_->zone(); | 745 return mutator_thread_->zone(); |
| 749 } | 746 } |
| 750 void set_current_zone(Zone* zone) { | 747 void set_current_zone(Zone* zone) { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 // We use 2 list entries for each registered extension handler. | 906 // We use 2 list entries for each registered extension handler. |
| 910 enum { | 907 enum { |
| 911 kRegisteredNameIndex = 0, | 908 kRegisteredNameIndex = 0, |
| 912 kRegisteredHandlerIndex, | 909 kRegisteredHandlerIndex, |
| 913 kRegisteredEntrySize | 910 kRegisteredEntrySize |
| 914 }; | 911 }; |
| 915 RawGrowableObjectArray* registered_service_extension_handlers_; | 912 RawGrowableObjectArray* registered_service_extension_handlers_; |
| 916 | 913 |
| 917 Metric* metrics_list_head_; | 914 Metric* metrics_list_head_; |
| 918 | 915 |
| 919 Counters counters_; | |
| 920 | |
| 921 bool compilation_allowed_; | 916 bool compilation_allowed_; |
| 922 | 917 |
| 923 // TODO(23153): Move this out of Isolate/Thread. | 918 // TODO(23153): Move this out of Isolate/Thread. |
| 924 CHA* cha_; | 919 CHA* cha_; |
| 925 | 920 |
| 926 // Isolate list next pointer. | 921 // Isolate list next pointer. |
| 927 Isolate* next_; | 922 Isolate* next_; |
| 928 | 923 |
| 929 // Used to wake the isolate when it is in the pause event loop. | 924 // Used to wake the isolate when it is in the pause event loop. |
| 930 Monitor* pause_loop_monitor_; | 925 Monitor* pause_loop_monitor_; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 uint8_t* serialized_message_; | 1124 uint8_t* serialized_message_; |
| 1130 intptr_t serialized_message_len_; | 1125 intptr_t serialized_message_len_; |
| 1131 Isolate::Flags isolate_flags_; | 1126 Isolate::Flags isolate_flags_; |
| 1132 bool paused_; | 1127 bool paused_; |
| 1133 bool errors_are_fatal_; | 1128 bool errors_are_fatal_; |
| 1134 }; | 1129 }; |
| 1135 | 1130 |
| 1136 } // namespace dart | 1131 } // namespace dart |
| 1137 | 1132 |
| 1138 #endif // VM_ISOLATE_H_ | 1133 #endif // VM_ISOLATE_H_ |
| OLD | NEW |