 Chromium Code Reviews
 Chromium Code Reviews Issue 2160613002:
  [heap] Remove black pages and use black areas instead.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 2160613002:
  [heap] Remove black pages and use black areas instead.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: src/heap/mark-compact.h | 
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h | 
| index 6a238839b18eb55d6139f1d83cc159a85343532c..8c93e4ba2ba29ebec14854e5321f41f045192340 100644 | 
| --- a/src/heap/mark-compact.h | 
| +++ b/src/heap/mark-compact.h | 
| @@ -218,7 +218,18 @@ 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(new_cell_index > cell_index_); | 
| 
ulan
2016/07/19 13:23:32
*DCHECK_GT
DCHECK_LE(new_cell_index, last_cell_ind
 
Hannes Payer (out of office)
2016/07/19 14:42:53
Done.
 | 
| + 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 +264,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(); |