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

Side by Side Diff: vm/base_isolate.h

Issue 10008030: Inline the StackResource constructor/destructor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « vm/allocation.cc ('k') | vm/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « vm/allocation.cc ('k') | vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698