| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
| 6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 class HeapObjectsFilter; | 294 class HeapObjectsFilter; |
| 295 class HeapStats; | 295 class HeapStats; |
| 296 class HistogramTimer; | 296 class HistogramTimer; |
| 297 class Isolate; | 297 class Isolate; |
| 298 class MemoryReducer; | 298 class MemoryReducer; |
| 299 class ObjectStats; | 299 class ObjectStats; |
| 300 class Scavenger; | 300 class Scavenger; |
| 301 class ScavengeJob; | 301 class ScavengeJob; |
| 302 class WeakObjectRetainer; | 302 class WeakObjectRetainer; |
| 303 | 303 |
| 304 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); | 304 enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION }; |
| 305 |
| 306 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to, |
| 307 PromotionMode mode); |
| 305 | 308 |
| 306 // A queue of objects promoted during scavenge. Each object is accompanied | 309 // A queue of objects promoted during scavenge. Each object is accompanied |
| 307 // by it's size to avoid dereferencing a map pointer for scanning. | 310 // by it's size to avoid dereferencing a map pointer for scanning. |
| 308 // The last page in to-space is used for the promotion queue. On conflict | 311 // The last page in to-space is used for the promotion queue. On conflict |
| 309 // during scavenge, the promotion queue is allocated externally and all | 312 // during scavenge, the promotion queue is allocated externally and all |
| 310 // entries are copied to the external queue. | 313 // entries are copied to the external queue. |
| 311 class PromotionQueue { | 314 class PromotionQueue { |
| 312 public: | 315 public: |
| 313 explicit PromotionQueue(Heap* heap) | 316 explicit PromotionQueue(Heap* heap) |
| 314 : front_(NULL), | 317 : front_(NULL), |
| (...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 friend class LargeObjectSpace; | 2650 friend class LargeObjectSpace; |
| 2648 friend class NewSpace; | 2651 friend class NewSpace; |
| 2649 friend class PagedSpace; | 2652 friend class PagedSpace; |
| 2650 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2653 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2651 }; | 2654 }; |
| 2652 | 2655 |
| 2653 } // namespace internal | 2656 } // namespace internal |
| 2654 } // namespace v8 | 2657 } // namespace v8 |
| 2655 | 2658 |
| 2656 #endif // V8_HEAP_HEAP_H_ | 2659 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |