OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 #ifndef VM_BASE_ISOLATE_H_ | |
6 #define VM_BASE_ISOLATE_H_ | |
7 | |
8 namespace dart { | |
9 | |
10 class HandleScope; | |
11 class StackResource; | |
12 class Zone; | |
13 | |
14 // A BaseIsolate contains just enough functionality to allocate | |
15 // StackResources. This allows us to inline the StackResource | |
16 // constructor/destructor for performance. | |
17 class BaseIsolate { | |
18 public: | |
19 StackResource* top_resource() const { return top_resource_; } | |
20 void set_top_resource(StackResource* value) { top_resource_ = value; } | |
21 | |
22 Zone* current_zone() const { return current_zone_; } | |
23 void set_current_zone(Zone* zone) { current_zone_ = zone; } | |
24 | |
25 #if defined(DEBUG) | |
26 static void AssertCurrent(BaseIsolate* isolate); | |
27 #endif | |
28 | |
29 protected: | |
30 BaseIsolate() : top_resource_(NULL), current_zone_(NULL) {} | |
31 ~BaseIsolate() { | |
32 // Do not delete stack resources: top_resource_ and current_zone_. | |
33 } | |
34 | |
35 StackResource* top_resource_; | |
36 Zone* current_zone_; | |
siva
2012/04/06 17:30:14
DISALLOW_COPY_AND_ASSIGN(BaseIsolate);
turnidge
2012/04/06 17:50:40
Done.
| |
37 }; | |
38 | |
39 } // namespace dart | |
40 | |
41 #endif // VM_BASE_ISOLATE_H_ | |
OLD | NEW |