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; |
11 class StackResource; | 11 class StackResource; |
12 class Zone; | 12 class Zone; |
13 | 13 |
14 // A BaseIsolate contains just enough functionality to allocate | 14 // A BaseIsolate contains just enough functionality to allocate |
15 // StackResources. This allows us to inline the StackResource | 15 // StackResources. This allows us to inline the StackResource |
16 // constructor/destructor for performance. | 16 // constructor/destructor for performance. |
17 class BaseIsolate { | 17 class BaseIsolate { |
18 public: | 18 public: |
19 StackResource* top_resource() const { return top_resource_; } | 19 StackResource* top_resource() const { return top_resource_; } |
20 void set_top_resource(StackResource* value) { top_resource_ = value; } | 20 void set_top_resource(StackResource* value) { top_resource_ = value; } |
21 | 21 |
| 22 // DEPRECATED: Use Thread::current_zone. |
22 Zone* current_zone() const { return current_zone_; } | 23 Zone* current_zone() const { return current_zone_; } |
23 void set_current_zone(Zone* zone) { current_zone_ = zone; } | 24 void set_current_zone(Zone* zone) { current_zone_ = zone; } |
24 | 25 |
25 HandleScope* top_handle_scope() const { | 26 HandleScope* top_handle_scope() const { |
26 #if defined(DEBUG) | 27 #if defined(DEBUG) |
27 return top_handle_scope_; | 28 return top_handle_scope_; |
28 #else | 29 #else |
29 return 0; | 30 return 0; |
30 #endif | 31 #endif |
31 } | 32 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 #endif | 124 #endif |
124 int32_t no_callback_scope_depth_; | 125 int32_t no_callback_scope_depth_; |
125 | 126 |
126 private: | 127 private: |
127 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); | 128 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); |
128 }; | 129 }; |
129 | 130 |
130 } // namespace dart | 131 } // namespace dart |
131 | 132 |
132 #endif // VM_BASE_ISOLATE_H_ | 133 #endif // VM_BASE_ISOLATE_H_ |
OLD | NEW |