summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/base/basic-slot-set.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/heap/base/basic-slot-set.h')
-rw-r--r--deps/v8/src/heap/base/basic-slot-set.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/src/heap/base/basic-slot-set.h b/deps/v8/src/heap/base/basic-slot-set.h
index 2f0bc1c872..87faceec44 100644
--- a/deps/v8/src/heap/base/basic-slot-set.h
+++ b/deps/v8/src/heap/base/basic-slot-set.h
@@ -101,6 +101,11 @@ class BasicSlotSet {
return slot_offset / (SlotGranularity * kBitsPerBucket);
}
+ // Converts bucket index into slot offset.
+ constexpr static size_t OffsetForBucket(size_t bucket_index) {
+ return bucket_index * SlotGranularity * kBitsPerBucket;
+ }
+
// The slot offset specifies a slot at address page_start_ + slot_offset.
// AccessMode defines whether there can be concurrent access on the buckets
// or not.