| 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" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 StoreBuffer* store_buffer() { return &store_buffer_; } | 147 StoreBuffer* store_buffer() { return &store_buffer_; } |
| 148 static intptr_t store_buffer_offset() { | 148 static intptr_t store_buffer_offset() { |
| 149 return OFFSET_OF(Isolate, store_buffer_); | 149 return OFFSET_OF(Isolate, store_buffer_); |
| 150 } | 150 } |
| 151 | 151 |
| 152 ClassTable* class_table() { return &class_table_; } | 152 ClassTable* class_table() { return &class_table_; } |
| 153 static intptr_t class_table_offset() { | 153 static intptr_t class_table_offset() { |
| 154 return OFFSET_OF(Isolate, class_table_); | 154 return OFFSET_OF(Isolate, class_table_); |
| 155 } | 155 } |
| 156 | 156 |
| 157 CHA* cha() const { return cha_; } | |
| 158 void set_cha(CHA* value) { cha_ = value; } | |
| 159 | |
| 160 MegamorphicCacheTable* megamorphic_cache_table() { | 157 MegamorphicCacheTable* megamorphic_cache_table() { |
| 161 return &megamorphic_cache_table_; | 158 return &megamorphic_cache_table_; |
| 162 } | 159 } |
| 163 | 160 |
| 164 Dart_MessageNotifyCallback message_notify_callback() const { | 161 Dart_MessageNotifyCallback message_notify_callback() const { |
| 165 return message_notify_callback_; | 162 return message_notify_callback_; |
| 166 } | 163 } |
| 167 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 164 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
| 168 message_notify_callback_ = value; | 165 message_notify_callback_ = value; |
| 169 } | 166 } |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 651 |
| 655 void BuildName(const char* name_prefix); | 652 void BuildName(const char* name_prefix); |
| 656 void PrintInvokedFunctions(); | 653 void PrintInvokedFunctions(); |
| 657 | 654 |
| 658 void ProfileIdle(); | 655 void ProfileIdle(); |
| 659 | 656 |
| 660 void set_user_tag(uword tag) { | 657 void set_user_tag(uword tag) { |
| 661 user_tag_ = tag; | 658 user_tag_ = tag; |
| 662 } | 659 } |
| 663 | 660 |
| 661 CHA* cha() const { return cha_; } |
| 662 void set_cha(CHA* value) { cha_ = value; } |
| 664 | 663 |
| 665 template<class T> T* AllocateReusableHandle(); | 664 template<class T> T* AllocateReusableHandle(); |
| 666 | 665 |
| 667 static ThreadLocalKey isolate_key; | 666 static ThreadLocalKey isolate_key; |
| 668 | 667 |
| 669 uword vm_tag_; | 668 uword vm_tag_; |
| 670 StoreBuffer store_buffer_; | 669 StoreBuffer store_buffer_; |
| 671 ClassTable class_table_; | 670 ClassTable class_table_; |
| 672 MegamorphicCacheTable megamorphic_cache_table_; | 671 MegamorphicCacheTable megamorphic_cache_table_; |
| 673 Dart_MessageNotifyCallback message_notify_callback_; | 672 Dart_MessageNotifyCallback message_notify_callback_; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 static void CheckForDuplicateThreadState(InterruptableThreadState* state); | 784 static void CheckForDuplicateThreadState(InterruptableThreadState* state); |
| 786 static Monitor* isolates_list_monitor_; | 785 static Monitor* isolates_list_monitor_; |
| 787 static Isolate* isolates_list_head_; | 786 static Isolate* isolates_list_head_; |
| 788 | 787 |
| 789 #define REUSABLE_FRIEND_DECLARATION(name) \ | 788 #define REUSABLE_FRIEND_DECLARATION(name) \ |
| 790 friend class Reusable##name##HandleScope; | 789 friend class Reusable##name##HandleScope; |
| 791 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) | 790 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
| 792 #undef REUSABLE_FRIEND_DECLARATION | 791 #undef REUSABLE_FRIEND_DECLARATION |
| 793 | 792 |
| 794 friend class ServiceIsolate; | 793 friend class ServiceIsolate; |
| 794 friend class Thread; |
| 795 | 795 |
| 796 DISALLOW_COPY_AND_ASSIGN(Isolate); | 796 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| 797 }; | 797 }; |
| 798 | 798 |
| 799 | 799 |
| 800 // When we need to execute code in an isolate, we use the | 800 // When we need to execute code in an isolate, we use the |
| 801 // StartIsolateScope. | 801 // StartIsolateScope. |
| 802 class StartIsolateScope { | 802 class StartIsolateScope { |
| 803 public: | 803 public: |
| 804 explicit StartIsolateScope(Isolate* new_isolate) | 804 explicit StartIsolateScope(Isolate* new_isolate) |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 uint8_t* serialized_args_; | 912 uint8_t* serialized_args_; |
| 913 intptr_t serialized_args_len_; | 913 intptr_t serialized_args_len_; |
| 914 uint8_t* serialized_message_; | 914 uint8_t* serialized_message_; |
| 915 intptr_t serialized_message_len_; | 915 intptr_t serialized_message_len_; |
| 916 bool paused_; | 916 bool paused_; |
| 917 }; | 917 }; |
| 918 | 918 |
| 919 } // namespace dart | 919 } // namespace dart |
| 920 | 920 |
| 921 #endif // VM_ISOLATE_H_ | 921 #endif // VM_ISOLATE_H_ |
| OLD | NEW |