Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index 6a238839b18eb55d6139f1d83cc159a85343532c..01170333d7bc6b421e4a294d7d278b5a72cbaa74 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -218,7 +218,19 @@ class MarkBitCellIterator BASE_EMBEDDED { |
inline void Advance() { |
cell_index_++; |
- cell_base_ += 32 * kPointerSize; |
+ cell_base_ += Bitmap::kBitsPerCell * kPointerSize; |
+ } |
+ |
+ inline bool Advance(unsigned int new_cell_index) { |
+ if (new_cell_index != cell_index_) { |
+ DCHECK_GT(new_cell_index, cell_index_); |
+ DCHECK_LE(new_cell_index, last_cell_index_); |
+ unsigned int diff = new_cell_index - cell_index_; |
+ cell_index_ = new_cell_index; |
+ cell_base_ += diff * (Bitmap::kBitsPerCell * kPointerSize); |
+ return true; |
+ } |
+ return false; |
} |
// Return the next mark bit cell. If there is no next it returns 0; |
@@ -253,8 +265,6 @@ class LiveObjectIterator BASE_EMBEDDED { |
it_(chunk_), |
cell_base_(it_.CurrentCellBase()), |
current_cell_(*it_.CurrentCell()) { |
- // Black pages can not be iterated. |
- DCHECK(!chunk->IsFlagSet(Page::BLACK_PAGE)); |
} |
HeapObject* Next(); |