5 #include "src/heap/invalidated-slots.h" 6 #include "src/heap/spaces.h" 11 InvalidatedSlotsFilter::InvalidatedSlotsFilter(MemoryChunk* chunk) {
13 DCHECK_IMPLIES(chunk->invalidated_slots() !=
nullptr,
14 chunk->InOldSpace() || chunk->InLargeObjectSpace());
19 slots_in_free_space_are_valid_ = chunk->SweepingDone() && chunk->InOldSpace();
21 InvalidatedSlots* invalidated_slots =
22 chunk->invalidated_slots() ? chunk->invalidated_slots() : &empty_;
23 iterator_ = invalidated_slots->begin();
24 iterator_end_ = invalidated_slots->end();
25 sentinel_ = chunk->area_end();
26 if (iterator_ != iterator_end_) {
27 invalidated_start_ = iterator_->first->address();
28 invalidated_end_ = invalidated_start_ + iterator_->second;
30 invalidated_start_ = sentinel_;
31 invalidated_end_ = sentinel_;
34 invalidated_object_ =
nullptr;
35 invalidated_object_size_ = 0;
37 last_slot_ = chunk->area_start();