5#ifndef RUNTIME_VM_OBJECT_SET_H_
6#define RUNTIME_VM_OBJECT_SET_H_
24 return address >= start_ && address < end_;
62 regions_.Sort(CompareRegions);
69 if (FindRegion(raw_addr, &
region)) {
70 return region->ContainsObject(raw_addr);
78 if (FindRegion(raw_addr, &
region)) {
79 return region->AddObject(raw_addr);
81 FATAL(
"Address not in any heap region");
87 const uword a_start = (*a)->start();
88 const uword b_start = (*b)->start();
89 if (a_start < b_start) {
91 }
else if (a_start == b_start) {
101 intptr_t hi = regions_.length() - 1;
103 const intptr_t mid = (hi - lo + 1) / 2 + lo;
107 if (
addr < (*region)->start()) {
109 }
else if (
addr >= (*region)->end()) {
120 GrowableArray<ObjectSetRegion*> regions_;
bool Contains(intptr_t i) const
bool ContainsAddress(uword address) const
ObjectSetRegion(Zone *zone, uword start, uword end)
intptr_t IndexForAddress(uword address) const
void AddObject(uword address)
bool ContainsObject(uword address) const
void Add(ObjectPtr raw_obj)
void AddRegion(uword start, uword end)
bool Contains(ObjectPtr raw_obj) const
static uword ToAddr(const UntaggedObject *raw_obj)
static constexpr bool IsAligned(T x, uintptr_t alignment, uintptr_t offset=0)
ClipOpAndAA opAA SkRegion region
constexpr intptr_t kWordSizeLog2
constexpr intptr_t kWordSize