| Index: src/heap/slot-set.h
|
| diff --git a/src/heap/slot-set.h b/src/heap/slot-set.h
|
| index da61052b8a68f1554e1822af7df3c48ff1eeda5d..7612199c3ce09651515885d30bf8c7336d4850ac 100644
|
| --- a/src/heap/slot-set.h
|
| +++ b/src/heap/slot-set.h
|
| @@ -66,6 +66,18 @@ class SlotSet : public Malloced {
|
| }
|
|
|
| // The slot offset specifies a slot at address page_start_ + slot_offset.
|
| + // Returns true if the set contains the slot.
|
| + bool Contains(int slot_offset) {
|
| + int bucket_index, cell_index, bit_index;
|
| + SlotToIndices(slot_offset, &bucket_index, &cell_index, &bit_index);
|
| + base::AtomicValue<uint32_t>* current_bucket = bucket[bucket_index].Value();
|
| + if (current_bucket == nullptr) {
|
| + return false;
|
| + }
|
| + return (current_bucket[cell_index].Value() & (1u << bit_index)) != 0;
|
| + }
|
| +
|
| + // The slot offset specifies a slot at address page_start_ + slot_offset.
|
| void Remove(int slot_offset) {
|
| int bucket_index, cell_index, bit_index;
|
| SlotToIndices(slot_offset, &bucket_index, &cell_index, &bit_index);
|
|
|