Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: runtime/vm/base_isolate.h

Issue 11028145: Changed StackZone and ApiZone to be containers for Zone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added assertion for ApiZone linking. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 StackZone; 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 StackZone* current_zone() const { return current_zone_; } 22 Zone* current_zone() const { return current_zone_; }
23 void set_current_zone(StackZone* zone) { current_zone_ = zone; } 23 void set_current_zone(Zone* zone) { current_zone_ = zone; }
24 24
25 HandleScope* top_handle_scope() const { 25 HandleScope* top_handle_scope() const {
26 #if defined(DEBUG) 26 #if defined(DEBUG)
27 return top_handle_scope_; 27 return top_handle_scope_;
28 #else 28 #else
29 return 0; 29 return 0;
30 #endif 30 #endif
31 } 31 }
32 32
33 void set_top_handle_scope(HandleScope* handle_scope) { 33 void set_top_handle_scope(HandleScope* handle_scope) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 #else 95 #else
96 current_zone_(NULL) 96 current_zone_(NULL)
97 #endif 97 #endif
98 {} 98 {}
99 99
100 ~BaseIsolate() { 100 ~BaseIsolate() {
101 // Do not delete stack resources: top_resource_ and current_zone_. 101 // Do not delete stack resources: top_resource_ and current_zone_.
102 } 102 }
103 103
104 StackResource* top_resource_; 104 StackResource* top_resource_;
105 StackZone* current_zone_; 105 Zone* current_zone_;
106 #if defined(DEBUG) 106 #if defined(DEBUG)
107 HandleScope* top_handle_scope_; 107 HandleScope* top_handle_scope_;
108 int32_t no_handle_scope_depth_; 108 int32_t no_handle_scope_depth_;
109 int32_t no_gc_scope_depth_; 109 int32_t no_gc_scope_depth_;
110 #endif 110 #endif
111 111
112 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); 112 DISALLOW_COPY_AND_ASSIGN(BaseIsolate);
113 }; 113 };
114 114
115 } // namespace dart 115 } // namespace dart
116 116
117 #endif // VM_BASE_ISOLATE_H_ 117 #endif // VM_BASE_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698