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

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

Issue 196413011: - Implement a PauseTimerScope so that we can properly exclude (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ALLOCATION_H_ 5 #ifndef VM_ALLOCATION_H_
6 #define VM_ALLOCATION_H_ 6 #define VM_ALLOCATION_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/base_isolate.h" 9 #include "vm/base_isolate.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 #if defined(DEBUG) 56 #if defined(DEBUG)
57 if (isolate() != NULL) { 57 if (isolate() != NULL) {
58 BaseIsolate::AssertCurrent(isolate()); 58 BaseIsolate::AssertCurrent(isolate());
59 } 59 }
60 #endif 60 #endif
61 } 61 }
62 62
63 BaseIsolate* isolate() const { return isolate_; } 63 BaseIsolate* isolate() const { return isolate_; }
64 64
65 // The delete operator should be private instead of public, but unfortunately
66 // the compiler complains when compiling the destructors for subclasses.
67 void operator delete(void* pointer) { UNREACHABLE(); }
68
69 private: 65 private:
70 BaseIsolate* isolate_; // Current isolate for this stack resource. 66 BaseIsolate* const isolate_; // Current isolate for this stack resource.
71 StackResource* previous_; 67 StackResource* previous_;
72 68
73 void* operator new(uword size); 69 DISALLOW_ALLOCATION();
74
75 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource); 70 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource);
76 }; 71 };
77 72
78 73
79 // Static allocated classes only contain static members and can never 74 // Static allocated classes only contain static members and can never
80 // be instantiated in the heap or on the stack. 75 // be instantiated in the heap or on the stack.
81 class AllStatic { 76 class AllStatic {
82 private: 77 private:
83 DISALLOW_ALLOCATION(); 78 DISALLOW_ALLOCATION();
84 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic); 79 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic);
(...skipping 23 matching lines...) Expand all
108 // deallocated by invoking DeleteAll() on the zone they live in. 103 // deallocated by invoking DeleteAll() on the zone they live in.
109 void operator delete(void* pointer) { UNREACHABLE(); } 104 void operator delete(void* pointer) { UNREACHABLE(); }
110 105
111 private: 106 private:
112 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated); 107 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
113 }; 108 };
114 109
115 } // namespace dart 110 } // namespace dart
116 111
117 #endif // VM_ALLOCATION_H_ 112 #endif // VM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698