| OLD | NEW |
| 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_HEAP_H_ | 5 #ifndef VM_HEAP_H_ |
| 6 #define VM_HEAP_H_ | 6 #define VM_HEAP_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 uword AllocateNew(intptr_t size); | 131 uword AllocateNew(intptr_t size); |
| 132 uword AllocateOld(intptr_t size); | 132 uword AllocateOld(intptr_t size); |
| 133 uword AllocateCode(PageSpace* space, intptr_t size); | 133 uword AllocateCode(PageSpace* space, intptr_t size); |
| 134 | 134 |
| 135 // The different spaces used for allocation. | 135 // The different spaces used for allocation. |
| 136 Scavenger* new_space_; | 136 Scavenger* new_space_; |
| 137 PageSpace* old_space_; | 137 PageSpace* old_space_; |
| 138 PageSpace* code_space_; | 138 PageSpace* code_space_; |
| 139 | 139 |
| 140 friend class GCTestHelper; |
| 140 DISALLOW_COPY_AND_ASSIGN(Heap); | 141 DISALLOW_COPY_AND_ASSIGN(Heap); |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 | 144 |
| 144 #if defined(DEBUG) | 145 #if defined(DEBUG) |
| 145 class NoGCScope : public StackResource { | 146 class NoGCScope : public StackResource { |
| 146 public: | 147 public: |
| 147 NoGCScope(); | 148 NoGCScope(); |
| 148 ~NoGCScope(); | 149 ~NoGCScope(); |
| 149 private: | 150 private: |
| 150 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 151 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 151 }; | 152 }; |
| 152 #else // defined(DEBUG) | 153 #else // defined(DEBUG) |
| 153 class NoGCScope : public ValueObject { | 154 class NoGCScope : public ValueObject { |
| 154 public: | 155 public: |
| 155 NoGCScope() {} | 156 NoGCScope() {} |
| 156 private: | 157 private: |
| 157 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 158 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 158 }; | 159 }; |
| 159 #endif // defined(DEBUG) | 160 #endif // defined(DEBUG) |
| 160 | 161 |
| 161 } // namespace dart | 162 } // namespace dart |
| 162 | 163 |
| 163 #endif // VM_HEAP_H_ | 164 #endif // VM_HEAP_H_ |
| OLD | NEW |