| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 static inline Isolate* Current() { | 121 static inline Isolate* Current() { |
| 122 Thread* thread = Thread::Current(); | 122 Thread* thread = Thread::Current(); |
| 123 return thread == NULL ? NULL : thread->isolate(); | 123 return thread == NULL ? NULL : thread->isolate(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void InitOnce(); | 126 static void InitOnce(); |
| 127 static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false); | 127 static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false); |
| 128 void Shutdown(); | 128 void Shutdown(); |
| 129 | 129 |
| 130 Isolate* ShallowCopy(); | |
| 131 | |
| 132 // Register a newly introduced class. | 130 // Register a newly introduced class. |
| 133 void RegisterClass(const Class& cls); | 131 void RegisterClass(const Class& cls); |
| 134 void RegisterClassAt(intptr_t index, const Class& cls); | 132 void RegisterClassAt(intptr_t index, const Class& cls); |
| 135 void ValidateClassTable(); | 133 void ValidateClassTable(); |
| 136 | 134 |
| 137 // Visit all object pointers. | 135 // Visit all object pointers. |
| 138 void VisitObjectPointers(ObjectPointerVisitor* visitor, | 136 void VisitObjectPointers(ObjectPointerVisitor* visitor, |
| 139 bool visit_prologue_weak_persistent_handles, | 137 bool visit_prologue_weak_persistent_handles, |
| 140 bool validate_frames); | 138 bool validate_frames); |
| 141 | 139 |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 | 665 |
| 668 static void VisitIsolates(IsolateVisitor* visitor); | 666 static void VisitIsolates(IsolateVisitor* visitor); |
| 669 | 667 |
| 670 Counters* counters() { return &counters_; } | 668 Counters* counters() { return &counters_; } |
| 671 | 669 |
| 672 // Handle service messages until we are told to resume execution. | 670 // Handle service messages until we are told to resume execution. |
| 673 void PauseEventHandler(); | 671 void PauseEventHandler(); |
| 674 | 672 |
| 675 private: | 673 private: |
| 676 Isolate(); | 674 Isolate(); |
| 677 explicit Isolate(Isolate* original); | |
| 678 | 675 |
| 679 void BuildName(const char* name_prefix); | 676 void BuildName(const char* name_prefix); |
| 680 void PrintInvokedFunctions(); | 677 void PrintInvokedFunctions(); |
| 681 | 678 |
| 682 void ProfileIdle(); | 679 void ProfileIdle(); |
| 683 | 680 |
| 684 void set_user_tag(uword tag) { | 681 void set_user_tag(uword tag) { |
| 685 user_tag_ = tag; | 682 user_tag_ = tag; |
| 686 } | 683 } |
| 687 | 684 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 uint8_t* serialized_args_; | 955 uint8_t* serialized_args_; |
| 959 intptr_t serialized_args_len_; | 956 intptr_t serialized_args_len_; |
| 960 uint8_t* serialized_message_; | 957 uint8_t* serialized_message_; |
| 961 intptr_t serialized_message_len_; | 958 intptr_t serialized_message_len_; |
| 962 bool paused_; | 959 bool paused_; |
| 963 }; | 960 }; |
| 964 | 961 |
| 965 } // namespace dart | 962 } // namespace dart |
| 966 | 963 |
| 967 #endif // VM_ISOLATE_H_ | 964 #endif // VM_ISOLATE_H_ |
| OLD | NEW |