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" |
11 #include "vm/class_table.h" | 11 #include "vm/class_table.h" |
12 #include "vm/counters.h" | 12 #include "vm/counters.h" |
13 #include "vm/handles.h" | 13 #include "vm/handles.h" |
14 #include "vm/megamorphic_cache_table.h" | 14 #include "vm/megamorphic_cache_table.h" |
15 #include "vm/metrics.h" | 15 #include "vm/metrics.h" |
16 #include "vm/random.h" | 16 #include "vm/random.h" |
17 #include "vm/store_buffer.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/trace_buffer.h" | 20 #include "vm/trace_buffer.h" |
22 #include "vm/timer.h" | 21 #include "vm/timer.h" |
23 | 22 |
24 namespace dart { | 23 namespace dart { |
25 | 24 |
26 // Forward declarations. | 25 // Forward declarations. |
27 class AbstractType; | 26 class AbstractType; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 class RawError; | 68 class RawError; |
70 class RawFloat32x4; | 69 class RawFloat32x4; |
71 class RawInt32x4; | 70 class RawInt32x4; |
72 class RawUserTag; | 71 class RawUserTag; |
73 class SampleBuffer; | 72 class SampleBuffer; |
74 class SendPort; | 73 class SendPort; |
75 class ServiceIdZone; | 74 class ServiceIdZone; |
76 class Simulator; | 75 class Simulator; |
77 class StackResource; | 76 class StackResource; |
78 class StackZone; | 77 class StackZone; |
| 78 class StoreBuffer; |
79 class StubCode; | 79 class StubCode; |
80 class TypeArguments; | 80 class TypeArguments; |
81 class TypeParameter; | 81 class TypeParameter; |
82 class UserTag; | 82 class UserTag; |
83 | 83 |
84 | 84 |
85 class IsolateVisitor { | 85 class IsolateVisitor { |
86 public: | 86 public: |
87 IsolateVisitor() {} | 87 IsolateVisitor() {} |
88 virtual ~IsolateVisitor() {} | 88 virtual ~IsolateVisitor() {} |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Visit all object pointers. | 134 // Visit all object pointers. |
135 void VisitObjectPointers(ObjectPointerVisitor* visitor, | 135 void VisitObjectPointers(ObjectPointerVisitor* visitor, |
136 bool visit_prologue_weak_persistent_handles, | 136 bool visit_prologue_weak_persistent_handles, |
137 bool validate_frames); | 137 bool validate_frames); |
138 | 138 |
139 // Visits weak object pointers. | 139 // Visits weak object pointers. |
140 void VisitWeakPersistentHandles(HandleVisitor* visitor, | 140 void VisitWeakPersistentHandles(HandleVisitor* visitor, |
141 bool visit_prologue_weak_persistent_handles); | 141 bool visit_prologue_weak_persistent_handles); |
142 void VisitPrologueWeakPersistentHandles(HandleVisitor* visitor); | 142 void VisitPrologueWeakPersistentHandles(HandleVisitor* visitor); |
143 | 143 |
144 StoreBuffer* store_buffer() { return &store_buffer_; } | 144 StoreBuffer* store_buffer() { return store_buffer_; } |
145 | 145 |
146 ClassTable* class_table() { return &class_table_; } | 146 ClassTable* class_table() { return &class_table_; } |
147 static intptr_t class_table_offset() { | 147 static intptr_t class_table_offset() { |
148 return OFFSET_OF(Isolate, class_table_); | 148 return OFFSET_OF(Isolate, class_table_); |
149 } | 149 } |
150 | 150 |
151 MegamorphicCacheTable* megamorphic_cache_table() { | 151 MegamorphicCacheTable* megamorphic_cache_table() { |
152 return &megamorphic_cache_table_; | 152 return &megamorphic_cache_table_; |
153 } | 153 } |
154 | 154 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 } | 715 } |
716 | 716 |
717 void set_mutator_thread(Thread* thread) { | 717 void set_mutator_thread(Thread* thread) { |
718 mutator_thread_ = thread; | 718 mutator_thread_ = thread; |
719 } | 719 } |
720 | 720 |
721 template<class T> T* AllocateReusableHandle(); | 721 template<class T> T* AllocateReusableHandle(); |
722 | 722 |
723 Thread* mutator_thread_; | 723 Thread* mutator_thread_; |
724 uword vm_tag_; | 724 uword vm_tag_; |
725 StoreBuffer store_buffer_; | 725 StoreBuffer* store_buffer_; |
726 ClassTable class_table_; | 726 ClassTable class_table_; |
727 MegamorphicCacheTable megamorphic_cache_table_; | 727 MegamorphicCacheTable megamorphic_cache_table_; |
728 Dart_MessageNotifyCallback message_notify_callback_; | 728 Dart_MessageNotifyCallback message_notify_callback_; |
729 char* name_; | 729 char* name_; |
730 char* debugger_name_; | 730 char* debugger_name_; |
731 int64_t start_time_; | 731 int64_t start_time_; |
732 Dart_Port main_port_; | 732 Dart_Port main_port_; |
733 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 733 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
734 uint64_t pause_capability_; | 734 uint64_t pause_capability_; |
735 uint64_t terminate_capability_; | 735 uint64_t terminate_capability_; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 intptr_t serialized_args_len_; | 991 intptr_t serialized_args_len_; |
992 uint8_t* serialized_message_; | 992 uint8_t* serialized_message_; |
993 intptr_t serialized_message_len_; | 993 intptr_t serialized_message_len_; |
994 Isolate::Flags isolate_flags_; | 994 Isolate::Flags isolate_flags_; |
995 bool paused_; | 995 bool paused_; |
996 }; | 996 }; |
997 | 997 |
998 } // namespace dart | 998 } // namespace dart |
999 | 999 |
1000 #endif // VM_ISOLATE_H_ | 1000 #endif // VM_ISOLATE_H_ |
OLD | NEW |