5#ifndef RUNTIME_VM_OBJECT_ID_RING_H_
6#define RUNTIME_VM_OBJECT_ID_RING_H_
14class ObjectPointerVisitor;
38 static constexpr int32_t
kMaxId = 0x3FFFFFFF;
59 void SetCapacityAndMaxSerial(int32_t capacity, int32_t max_serial);
60 int32_t FindExistingIdForObject(
ObjectPtr raw_obj);
69 int32_t table_size() {
return capacity_; }
72 int32_t AllocateNewId(ObjectPtr
object);
73 int32_t IndexOfId(int32_t
id);
74 int32_t IdOfIndex(int32_t index);
75 bool IsValidContiguous(int32_t
id);
76 bool IsValidId(int32_t
id);
static constexpr int32_t kDefaultCapacity
static constexpr int32_t kInvalidId
ObjectPtr GetObjectForId(int32_t id, LookupResult *kind)
static constexpr int32_t kMaxId
void VisitPointers(ObjectPointerVisitor *visitor)
int32_t GetIdForObject(ObjectPtr raw_obj, IdPolicy policy=kAllocateId)
void PrintJSON(JSONStream *js)