Index: src/heap/mark-compact-inl.h |
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h |
index 5932c6e4fa22873294da5455e91824c918263e23..281ece4cc8d693601e26bd5a6df454064dccfa5a 100644 |
--- a/src/heap/mark-compact-inl.h |
+++ b/src/heap/mark-compact-inl.h |
@@ -143,21 +143,10 @@ template <LiveObjectIterationMode T> |
HeapObject* LiveObjectIterator<T>::Next() { |
while (!it_.Done()) { |
HeapObject* object = nullptr; |
- if (T == kGreyObjectsOnBlackPage) { |
- // Black objects will have most of the mark bits set to 1. If we invert |
- // the mark bits, grey objects will be left but the mark bit is moved by |
- // one position. We can just substract one word from the found location |
- // to obtain the grey object. |
- current_cell_ = ~current_cell_; |
- } |
while (current_cell_ != 0) { |
uint32_t trailing_zeros = base::bits::CountTrailingZeros32(current_cell_); |
Address addr = cell_base_ + trailing_zeros * kPointerSize; |
- if (T == kGreyObjectsOnBlackPage) { |
- addr -= kPointerSize; |
- } |
- |
// Clear the first bit of the found object.. |
current_cell_ &= ~(1u << trailing_zeros); |
@@ -179,14 +168,10 @@ HeapObject* LiveObjectIterator<T>::Next() { |
object = HeapObject::FromAddress(addr); |
} else if (T == kAllLiveObjects) { |
object = HeapObject::FromAddress(addr); |
- } else if (T == kGreyObjectsOnBlackPage) { |
- object = HeapObject::FromAddress(addr); |
} |
- if (T != kGreyObjectsOnBlackPage) { |
- // Clear the second bit of the found object. |
- current_cell_ &= ~second_bit_index; |
- } |
+ // Clear the second bit of the found object. |
+ current_cell_ &= ~second_bit_index; |
// We found a live object. |
if (object != nullptr) break; |