| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 uword AllocateNew(intptr_t size); | 143 uword AllocateNew(intptr_t size); |
| 144 uword AllocateOld(intptr_t size); | 144 uword AllocateOld(intptr_t size); |
| 145 uword AllocateCode(PageSpace* space, intptr_t size); | 145 uword AllocateCode(PageSpace* space, intptr_t size); |
| 146 | 146 |
| 147 // The different spaces used for allocation. | 147 // The different spaces used for allocation. |
| 148 Scavenger* new_space_; | 148 Scavenger* new_space_; |
| 149 PageSpace* old_space_; | 149 PageSpace* old_space_; |
| 150 PageSpace* code_space_; | 150 PageSpace* code_space_; |
| 151 | 151 |
| 152 friend class GCTestHelper; |
| 152 DISALLOW_COPY_AND_ASSIGN(Heap); | 153 DISALLOW_COPY_AND_ASSIGN(Heap); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 | 156 |
| 156 #if defined(DEBUG) | 157 #if defined(DEBUG) |
| 157 class NoGCScope : public StackResource { | 158 class NoGCScope : public StackResource { |
| 158 public: | 159 public: |
| 159 NoGCScope(); | 160 NoGCScope(); |
| 160 ~NoGCScope(); | 161 ~NoGCScope(); |
| 161 private: | 162 private: |
| 162 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 163 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 163 }; | 164 }; |
| 164 #else // defined(DEBUG) | 165 #else // defined(DEBUG) |
| 165 class NoGCScope : public ValueObject { | 166 class NoGCScope : public ValueObject { |
| 166 public: | 167 public: |
| 167 NoGCScope() {} | 168 NoGCScope() {} |
| 168 private: | 169 private: |
| 169 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 170 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 170 }; | 171 }; |
| 171 #endif // defined(DEBUG) | 172 #endif // defined(DEBUG) |
| 172 | 173 |
| 173 } // namespace dart | 174 } // namespace dart |
| 174 | 175 |
| 175 #endif // VM_HEAP_H_ | 176 #endif // VM_HEAP_H_ |
| OLD | NEW |