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_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 explicit LiveObjectIterator(MemoryChunk* chunk) | 314 explicit LiveObjectIterator(MemoryChunk* chunk) |
315 : chunk_(chunk), | 315 : chunk_(chunk), |
316 it_(chunk_), | 316 it_(chunk_), |
317 cell_base_(it_.CurrentCellBase()), | 317 cell_base_(it_.CurrentCellBase()), |
318 current_cell_(*it_.CurrentCell()) { | 318 current_cell_(*it_.CurrentCell()) { |
319 } | 319 } |
320 | 320 |
321 HeapObject* Next(); | 321 HeapObject* Next(); |
322 | 322 |
323 private: | 323 private: |
| 324 inline Heap* heap() { return chunk_->heap(); } |
| 325 |
324 MemoryChunk* chunk_; | 326 MemoryChunk* chunk_; |
325 MarkBitCellIterator it_; | 327 MarkBitCellIterator it_; |
326 Address cell_base_; | 328 Address cell_base_; |
327 MarkBit::CellType current_cell_; | 329 MarkBit::CellType current_cell_; |
328 }; | 330 }; |
329 | 331 |
330 // ------------------------------------------------------------------------- | 332 // ------------------------------------------------------------------------- |
331 // Mark-Compact collector | 333 // Mark-Compact collector |
332 class MarkCompactCollector { | 334 class MarkCompactCollector { |
333 public: | 335 public: |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 | 771 |
770 private: | 772 private: |
771 MarkCompactCollector* collector_; | 773 MarkCompactCollector* collector_; |
772 }; | 774 }; |
773 | 775 |
774 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); | 776 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); |
775 } // namespace internal | 777 } // namespace internal |
776 } // namespace v8 | 778 } // namespace v8 |
777 | 779 |
778 #endif // V8_HEAP_MARK_COMPACT_H_ | 780 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |