| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |