| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_BASE_ISOLATE_H_ | 5 #ifndef VM_BASE_ISOLATE_H_ |
| 6 #define VM_BASE_ISOLATE_H_ | 6 #define VM_BASE_ISOLATE_H_ |
| 7 | 7 |
| 8 namespace dart { | 8 namespace dart { |
| 9 | 9 |
| 10 class HandleScope; | 10 class HandleScope; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 void DecrementNoCallbackScopeDepth() { | 92 void DecrementNoCallbackScopeDepth() { |
| 93 ASSERT(no_callback_scope_depth_ > 0); | 93 ASSERT(no_callback_scope_depth_ > 0); |
| 94 no_callback_scope_depth_ -= 1; | 94 no_callback_scope_depth_ -= 1; |
| 95 } | 95 } |
| 96 | 96 |
| 97 #if defined(DEBUG) | 97 #if defined(DEBUG) |
| 98 static void AssertCurrent(BaseIsolate* isolate); | 98 static void AssertCurrent(BaseIsolate* isolate); |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 uword vm_tag() const { |
| 102 return vm_tag_; |
| 103 } |
| 104 |
| 105 void set_vm_tag(uword tag) { |
| 106 vm_tag_ = tag; |
| 107 } |
| 108 |
| 101 protected: | 109 protected: |
| 102 BaseIsolate() | 110 BaseIsolate() |
| 103 : top_resource_(NULL), | 111 : top_resource_(NULL), |
| 104 current_zone_(NULL), | 112 current_zone_(NULL), |
| 105 #if defined(DEBUG) | 113 #if defined(DEBUG) |
| 106 top_handle_scope_(NULL), | 114 top_handle_scope_(NULL), |
| 107 no_handle_scope_depth_(0), | 115 no_handle_scope_depth_(0), |
| 108 no_gc_scope_depth_(0), | 116 no_gc_scope_depth_(0), |
| 109 #endif | 117 #endif |
| 110 no_callback_scope_depth_(0) | 118 no_callback_scope_depth_(0), |
| 119 vm_tag_(0) |
| 111 {} | 120 {} |
| 112 | 121 |
| 113 ~BaseIsolate() { | 122 ~BaseIsolate() { |
| 114 // Do not delete stack resources: top_resource_ and current_zone_. | 123 // Do not delete stack resources: top_resource_ and current_zone_. |
| 115 } | 124 } |
| 116 | 125 |
| 117 StackResource* top_resource_; | 126 StackResource* top_resource_; |
| 118 Zone* current_zone_; | 127 Zone* current_zone_; |
| 119 #if defined(DEBUG) | 128 #if defined(DEBUG) |
| 120 HandleScope* top_handle_scope_; | 129 HandleScope* top_handle_scope_; |
| 121 int32_t no_handle_scope_depth_; | 130 int32_t no_handle_scope_depth_; |
| 122 int32_t no_gc_scope_depth_; | 131 int32_t no_gc_scope_depth_; |
| 123 #endif | 132 #endif |
| 124 int32_t no_callback_scope_depth_; | 133 int32_t no_callback_scope_depth_; |
| 134 uword vm_tag_; |
| 125 | 135 |
| 126 private: | 136 private: |
| 127 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); | 137 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); |
| 128 }; | 138 }; |
| 129 | 139 |
| 130 } // namespace dart | 140 } // namespace dart |
| 131 | 141 |
| 132 #endif // VM_BASE_ISOLATE_H_ | 142 #endif // VM_BASE_ISOLATE_H_ |
| OLD | NEW |