Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ObjectSetRegion Class Reference

#include <object_set.h>

Inheritance diagram for dart::ObjectSetRegion:
dart::ZoneAllocated

Public Member Functions

 ObjectSetRegion (Zone *zone, uword start, uword end)
 
bool ContainsAddress (uword address) const
 
intptr_t IndexForAddress (uword address) const
 
void AddObject (uword address)
 
bool ContainsObject (uword address) const
 
uword start () const
 
uword end () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Detailed Description

Definition at line 16 of file object_set.h.

Constructor & Destructor Documentation

◆ ObjectSetRegion()

dart::ObjectSetRegion::ObjectSetRegion ( Zone zone,
uword  start,
uword  end 
)
inline

Definition at line 18 of file object_set.h.

19 : start_(start),
20 end_(end),
21 bit_vector_(zone, (end - start) >> kWordSizeLog2) {}
uword end() const
Definition: object_set.h:39
uword start() const
Definition: object_set.h:38
constexpr intptr_t kWordSizeLog2
Definition: globals.h:507

Member Function Documentation

◆ AddObject()

void dart::ObjectSetRegion::AddObject ( uword  address)
inline

Definition at line 32 of file object_set.h.

32{ bit_vector_.Add(IndexForAddress(address)); }
void Add(intptr_t i)
Definition: bit_vector.h:63
intptr_t IndexForAddress(uword address) const
Definition: object_set.h:27

◆ ContainsAddress()

bool dart::ObjectSetRegion::ContainsAddress ( uword  address) const
inline

Definition at line 23 of file object_set.h.

23 {
24 return address >= start_ && address < end_;
25 }

◆ ContainsObject()

bool dart::ObjectSetRegion::ContainsObject ( uword  address) const
inline

Definition at line 34 of file object_set.h.

34 {
35 return bit_vector_.Contains(IndexForAddress(address));
36 }
bool Contains(intptr_t i) const
Definition: bit_vector.h:91

◆ end()

uword dart::ObjectSetRegion::end ( ) const
inline

Definition at line 39 of file object_set.h.

39{ return end_; }

◆ IndexForAddress()

intptr_t dart::ObjectSetRegion::IndexForAddress ( uword  address) const
inline

Definition at line 27 of file object_set.h.

27 {
29 return (address - start_) >> kWordSizeLog2;
30 }
static constexpr bool IsAligned(T x, uintptr_t alignment, uintptr_t offset=0)
Definition: utils.h:92
#define ASSERT(E)
constexpr intptr_t kWordSize
Definition: globals.h:509

◆ start()

uword dart::ObjectSetRegion::start ( ) const
inline

Definition at line 38 of file object_set.h.

38{ return start_; }

The documentation for this class was generated from the following file: