| Index: src/heap/remembered-set.h
|
| diff --git a/src/heap/remembered-set.h b/src/heap/remembered-set.h
|
| index a625b13dbf1fe0deced0b60291c2e86f16b0d0fb..2b851158009818fec006e8dbdb4c0a59f3122a2f 100644
|
| --- a/src/heap/remembered-set.h
|
| +++ b/src/heap/remembered-set.h
|
| @@ -31,6 +31,19 @@ class RememberedSet {
|
| slot_set[offset / Page::kPageSize].Insert(offset % Page::kPageSize);
|
| }
|
|
|
| + // Given a page and a slot in that page, this function returns true if
|
| + // the remembered set contains the slot.
|
| + static bool Contains(MemoryChunk* chunk, Address slot_addr) {
|
| + DCHECK(chunk->Contains(slot_addr));
|
| + SlotSet* slot_set = GetSlotSet(chunk);
|
| + if (slot_set == nullptr) {
|
| + return false;
|
| + }
|
| + uintptr_t offset = slot_addr - chunk->address();
|
| + return slot_set[offset / Page::kPageSize].Contains(offset %
|
| + Page::kPageSize);
|
| + }
|
| +
|
| // Given a page and a slot in that page, this function removes the slot from
|
| // the remembered set.
|
| // If the slot was never added, then the function does nothing.
|
|
|