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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 static inline Isolate* Current() { | 123 static inline Isolate* Current() { |
124 Thread* thread = Thread::Current(); | 124 Thread* thread = Thread::Current(); |
125 return thread == NULL ? NULL : thread->isolate(); | 125 return thread == NULL ? NULL : thread->isolate(); |
126 } | 126 } |
127 | 127 |
128 static void InitOnce(); | 128 static void InitOnce(); |
129 static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false); | 129 static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false); |
130 void Shutdown(); | 130 void Shutdown(); |
131 | 131 |
132 Isolate* ShallowCopy(); | |
133 | |
134 // Register a newly introduced class. | 132 // Register a newly introduced class. |
135 void RegisterClass(const Class& cls); | 133 void RegisterClass(const Class& cls); |
136 void RegisterClassAt(intptr_t index, const Class& cls); | 134 void RegisterClassAt(intptr_t index, const Class& cls); |
137 void ValidateClassTable(); | 135 void ValidateClassTable(); |
138 | 136 |
139 // Visit all object pointers. | 137 // Visit all object pointers. |
140 void VisitObjectPointers(ObjectPointerVisitor* visitor, | 138 void VisitObjectPointers(ObjectPointerVisitor* visitor, |
141 bool visit_prologue_weak_persistent_handles, | 139 bool visit_prologue_weak_persistent_handles, |
142 bool validate_frames); | 140 bool validate_frames); |
143 | 141 |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 671 |
674 static void VisitIsolates(IsolateVisitor* visitor); | 672 static void VisitIsolates(IsolateVisitor* visitor); |
675 | 673 |
676 Counters* counters() { return &counters_; } | 674 Counters* counters() { return &counters_; } |
677 | 675 |
678 // Handle service messages until we are told to resume execution. | 676 // Handle service messages until we are told to resume execution. |
679 void PauseEventHandler(); | 677 void PauseEventHandler(); |
680 | 678 |
681 private: | 679 private: |
682 Isolate(); | 680 Isolate(); |
683 explicit Isolate(Isolate* original); | |
684 | 681 |
685 void BuildName(const char* name_prefix); | 682 void BuildName(const char* name_prefix); |
686 void PrintInvokedFunctions(); | 683 void PrintInvokedFunctions(); |
687 | 684 |
688 void ProfileIdle(); | 685 void ProfileIdle(); |
689 | 686 |
690 void set_user_tag(uword tag) { | 687 void set_user_tag(uword tag) { |
691 user_tag_ = tag; | 688 user_tag_ = tag; |
692 } | 689 } |
693 | 690 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 uint8_t* serialized_args_; | 963 uint8_t* serialized_args_; |
967 intptr_t serialized_args_len_; | 964 intptr_t serialized_args_len_; |
968 uint8_t* serialized_message_; | 965 uint8_t* serialized_message_; |
969 intptr_t serialized_message_len_; | 966 intptr_t serialized_message_len_; |
970 bool paused_; | 967 bool paused_; |
971 }; | 968 }; |
972 | 969 |
973 } // namespace dart | 970 } // namespace dart |
974 | 971 |
975 #endif // VM_ISOLATE_H_ | 972 #endif // VM_ISOLATE_H_ |
OLD | NEW |