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

Side by Side Diff: vm/allocation.h

Issue 8562008: Make the implicit constructor private for zone, handlescope and nohandlescope classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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 | vm/handles.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assert.h" 8 #include "vm/assert.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // The delete operator should be private instead of public, but unfortunately 43 // The delete operator should be private instead of public, but unfortunately
44 // the compiler complains when compiling the destructors for subclasses. 44 // the compiler complains when compiling the destructors for subclasses.
45 void operator delete(void* pointer) { UNREACHABLE(); } 45 void operator delete(void* pointer) { UNREACHABLE(); }
46 46
47 private: 47 private:
48 Isolate* isolate_; // Current isolate for this stack resource. 48 Isolate* isolate_; // Current isolate for this stack resource.
49 StackResource* previous_; 49 StackResource* previous_;
50 50
51 void* operator new(uword size); 51 void* operator new(uword size);
52 52
53 DISALLOW_COPY_AND_ASSIGN(StackResource); 53 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource);
54 }; 54 };
55 55
56 56
57 // Static allocated classes only contain static members and can never 57 // Static allocated classes only contain static members and can never
58 // be instantiated in the heap or on the stack. 58 // be instantiated in the heap or on the stack.
59 class AllStatic { 59 class AllStatic {
60 private: 60 private:
61 DISALLOW_ALLOCATION(); 61 DISALLOW_ALLOCATION();
62 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic); 62 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic);
63 }; 63 };
(...skipping 22 matching lines...) Expand all
86 // deallocated by invoking DeleteAll() on the zone they live in. 86 // deallocated by invoking DeleteAll() on the zone they live in.
87 void operator delete(void* pointer) { UNREACHABLE(); } 87 void operator delete(void* pointer) { UNREACHABLE(); }
88 88
89 private: 89 private:
90 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated); 90 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
91 }; 91 };
92 92
93 } // namespace dart 93 } // namespace dart
94 94
95 #endif // VM_ALLOCATION_H_ 95 #endif // VM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « no previous file | vm/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698