| 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 RUNTIME_VM_ISOLATE_H_ |     5 #ifndef RUNTIME_VM_ISOLATE_H_ | 
|     6 #define RUNTIME_VM_ISOLATE_H_ |     6 #define RUNTIME_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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   171   // Visits weak object pointers. |   171   // Visits weak object pointers. | 
|   172   void VisitWeakPersistentHandles(HandleVisitor* visitor); |   172   void VisitWeakPersistentHandles(HandleVisitor* visitor); | 
|   173  |   173  | 
|   174   // Prepares all threads in an isolate for Garbage Collection. |   174   // Prepares all threads in an isolate for Garbage Collection. | 
|   175   void PrepareForGC(); |   175   void PrepareForGC(); | 
|   176  |   176  | 
|   177   StoreBuffer* store_buffer() { return store_buffer_; } |   177   StoreBuffer* store_buffer() { return store_buffer_; } | 
|   178  |   178  | 
|   179   ThreadRegistry* thread_registry() const { return thread_registry_; } |   179   ThreadRegistry* thread_registry() const { return thread_registry_; } | 
|   180   SafepointHandler* safepoint_handler() const { return safepoint_handler_; } |   180   SafepointHandler* safepoint_handler() const { return safepoint_handler_; } | 
|   181   intptr_t GetIsolateHighWatermark() const { |   181  | 
|   182     return isolate_memory_high_watermark_; |  | 
|   183   } |  | 
|   184   ClassTable* class_table() { return &class_table_; } |   182   ClassTable* class_table() { return &class_table_; } | 
|   185   static intptr_t class_table_offset() { |   183   static intptr_t class_table_offset() { | 
|   186     return OFFSET_OF(Isolate, class_table_); |   184     return OFFSET_OF(Isolate, class_table_); | 
|   187   } |   185   } | 
|   188  |   186  | 
|   189   // Prefers old classes when we are in the middle of a reload. |   187   // Prefers old classes when we are in the middle of a reload. | 
|   190   RawClass* GetClassForHeapWalkAt(intptr_t cid); |   188   RawClass* GetClassForHeapWalkAt(intptr_t cid); | 
|   191  |   189  | 
|   192   static intptr_t ic_miss_code_offset() { |   190   static intptr_t ic_miss_code_offset() { | 
|   193     return OFFSET_OF(Isolate, ic_miss_code_); |   191     return OFFSET_OF(Isolate, ic_miss_code_); | 
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   689   } |   687   } | 
|   690   void set_registered_service_extension_handlers( |   688   void set_registered_service_extension_handlers( | 
|   691       const GrowableObjectArray& value); |   689       const GrowableObjectArray& value); | 
|   692  |   690  | 
|   693   Monitor* threads_lock() const; |   691   Monitor* threads_lock() const; | 
|   694   Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); |   692   Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); | 
|   695   void UnscheduleThread(Thread* thread, |   693   void UnscheduleThread(Thread* thread, | 
|   696                         bool is_mutator, |   694                         bool is_mutator, | 
|   697                         bool bypass_safepoint = false); |   695                         bool bypass_safepoint = false); | 
|   698  |   696  | 
|   699   // Updates the maximum memory usage in bytes of all zones in all threads of |  | 
|   700   // the current isolate. |  | 
|   701   void UpdateIsolateHighWatermark(); |  | 
|   702  |  | 
|   703   // DEPRECATED: Use Thread's methods instead. During migration, these default |   697   // DEPRECATED: Use Thread's methods instead. During migration, these default | 
|   704   // to using the mutator thread (which must also be the current thread). |   698   // to using the mutator thread (which must also be the current thread). | 
|   705   Zone* current_zone() const { |   699   Zone* current_zone() const { | 
|   706     ASSERT(Thread::Current() == mutator_thread()); |   700     ASSERT(Thread::Current() == mutator_thread()); | 
|   707     return mutator_thread()->zone(); |   701     return mutator_thread()->zone(); | 
|   708   } |   702   } | 
|   709  |   703  | 
|   710   // Accessed from generated code: |   704   // Accessed from generated code: | 
|   711   StoreBuffer* store_buffer_; |   705   StoreBuffer* store_buffer_; | 
|   712   Heap* heap_; |   706   Heap* heap_; | 
|   713   uword user_tag_; |   707   uword user_tag_; | 
|   714   RawUserTag* current_tag_; |   708   RawUserTag* current_tag_; | 
|   715   RawUserTag* default_tag_; |   709   RawUserTag* default_tag_; | 
|   716   RawCode* ic_miss_code_; |   710   RawCode* ic_miss_code_; | 
|   717   ObjectStore* object_store_; |   711   ObjectStore* object_store_; | 
|   718   ClassTable class_table_; |   712   ClassTable class_table_; | 
|   719   bool single_step_; |   713   bool single_step_; | 
|   720  |   714  | 
|   721   ThreadRegistry* thread_registry_; |   715   ThreadRegistry* thread_registry_; | 
|   722   SafepointHandler* safepoint_handler_; |   716   SafepointHandler* safepoint_handler_; | 
|   723   intptr_t isolate_memory_high_watermark_; |  | 
|   724   Dart_MessageNotifyCallback message_notify_callback_; |   717   Dart_MessageNotifyCallback message_notify_callback_; | 
|   725   char* name_; |   718   char* name_; | 
|   726   char* debugger_name_; |   719   char* debugger_name_; | 
|   727   int64_t start_time_micros_; |   720   int64_t start_time_micros_; | 
|   728   Dart_Port main_port_; |   721   Dart_Port main_port_; | 
|   729   Dart_Port origin_id_;  // Isolates created by spawnFunc have some origin id. |   722   Dart_Port origin_id_;  // Isolates created by spawnFunc have some origin id. | 
|   730   uint64_t pause_capability_; |   723   uint64_t pause_capability_; | 
|   731   uint64_t terminate_capability_; |   724   uint64_t terminate_capability_; | 
|   732   bool errors_fatal_; |   725   bool errors_fatal_; | 
|   733   void* init_callback_data_; |   726   void* init_callback_data_; | 
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1000   intptr_t* spawn_count_; |   993   intptr_t* spawn_count_; | 
|  1001  |   994  | 
|  1002   Dart_IsolateFlags isolate_flags_; |   995   Dart_IsolateFlags isolate_flags_; | 
|  1003   bool paused_; |   996   bool paused_; | 
|  1004   bool errors_are_fatal_; |   997   bool errors_are_fatal_; | 
|  1005 }; |   998 }; | 
|  1006  |   999  | 
|  1007 }  // namespace dart |  1000 }  // namespace dart | 
|  1008  |  1001  | 
|  1009 #endif  // RUNTIME_VM_ISOLATE_H_ |  1002 #endif  // RUNTIME_VM_ISOLATE_H_ | 
| OLD | NEW |