Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dart::PointerBlock< Size > Class Template Reference

#include <pointer_block.h>

Inheritance diagram for dart::PointerBlock< Size >:
dart::MallocAllocated

Public Types

enum  { kSize = Size }
 

Public Member Functions

void Reset ()
 
PointerBlock< Size > * next () const
 
void set_next (PointerBlock< Size > *next)
 
intptr_t Count () const
 
bool IsFull () const
 
bool IsEmpty () const
 
void Push (ObjectPtr obj)
 
ObjectPtr Pop ()
 
void VisitObjectPointers (ObjectPointerVisitor *visitor)
 
- Public Member Functions inherited from dart::MallocAllocated
 MallocAllocated ()
 
void * operator new (size_t size)
 
void * operator new[] (size_t size)
 
void operator delete (void *pointer)
 
void operator delete[] (void *pointer)
 

Static Public Member Functions

static intptr_t top_offset ()
 
static intptr_t pointers_offset ()
 

Friends

template<int >
class BlockStack
 
template<int , typename T >
class LocalBlockWorkList
 

Detailed Description

template<int Size>
class dart::PointerBlock< Size >

Definition at line 21 of file pointer_block.h.

Member Enumeration Documentation

◆ anonymous enum

template<int Size>
anonymous enum
Enumerator
kSize 

Definition at line 23 of file pointer_block.h.

23{ kSize = Size };
TSize< Scalar > Size
Definition size.h:137

Member Function Documentation

◆ Count()

template<int Size>
intptr_t dart::PointerBlock< Size >::Count ( ) const
inline

Definition at line 33 of file pointer_block.h.

33{ return top_; }

◆ IsEmpty()

template<int Size>
bool dart::PointerBlock< Size >::IsEmpty ( ) const
inline

Definition at line 35 of file pointer_block.h.

35{ return Count() == 0; }
intptr_t Count() const

◆ IsFull()

template<int Size>
bool dart::PointerBlock< Size >::IsFull ( ) const
inline

Definition at line 34 of file pointer_block.h.

34{ return Count() == kSize; }

◆ next()

template<int Size>
PointerBlock< Size > * dart::PointerBlock< Size >::next ( ) const
inline

Definition at line 30 of file pointer_block.h.

30{ return next_; }

◆ pointers_offset()

template<int Size>
static intptr_t dart::PointerBlock< Size >::pointers_offset ( )
inlinestatic

Definition at line 61 of file pointer_block.h.

61 {
62 return OFFSET_OF(PointerBlock<Size>, pointers_);
63 }
#define OFFSET_OF(type, field)
Definition globals.h:138

◆ Pop()

template<int Size>
ObjectPtr dart::PointerBlock< Size >::Pop ( )
inline

Definition at line 42 of file pointer_block.h.

42 {
43 ASSERT(!IsEmpty());
44 return pointers_[--top_];
45 }
bool IsEmpty() const
#define ASSERT(E)

◆ Push()

template<int Size>
void dart::PointerBlock< Size >::Push ( ObjectPtr  obj)
inline

Definition at line 37 of file pointer_block.h.

37 {
38 ASSERT(!IsFull());
39 pointers_[top_++] = obj;
40 }
bool IsFull() const

◆ Reset()

template<int Size>
void dart::PointerBlock< Size >::Reset ( )
inline

Definition at line 25 of file pointer_block.h.

25 {
26 top_ = 0;
27 next_ = nullptr;
28 }

◆ set_next()

template<int Size>
void dart::PointerBlock< Size >::set_next ( PointerBlock< Size > *  next)
inline

Definition at line 31 of file pointer_block.h.

31{ next_ = next; }
PointerBlock< Size > * next() const

◆ top_offset()

template<int Size>
static intptr_t dart::PointerBlock< Size >::top_offset ( )
inlinestatic

Definition at line 60 of file pointer_block.h.

60{ return OFFSET_OF(PointerBlock<Size>, top_); }

◆ VisitObjectPointers()

template<int Size>
void dart::PointerBlock< Size >::VisitObjectPointers ( ObjectPointerVisitor visitor)

Definition at line 141 of file pointer_block.cc.

141 {
142 // Generated code appends to store buffers; tell MemorySanitizer.
143 MSAN_UNPOISON(this, sizeof(*this));
144 visitor->VisitPointers(&pointers_[0], top_);
145}
#define MSAN_UNPOISON(ptr, len)

Friends And Related Symbol Documentation

◆ BlockStack

template<int Size>
template<int >
friend class BlockStack
friend

Definition at line 78 of file pointer_block.h.

◆ LocalBlockWorkList

template<int Size>
template<int , typename T >
friend class LocalBlockWorkList
friend

Definition at line 80 of file pointer_block.h.


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