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

#include <dart_api_state.h>

Inheritance diagram for dart::LocalHandles:
dart::Handles< kLocalHandleSizeInWords, kLocalHandlesPerChunk, kOffsetOfRawPtrInLocalHandle >

Public Member Functions

 LocalHandles ()
 
 ~LocalHandles ()
 
void VisitObjectPointers (ObjectPointerVisitor *visitor)
 
void Reset ()
 
LocalHandleAllocateHandle ()
 
bool IsValidHandle (Dart_Handle object) const
 
int CountHandles () const
 

Detailed Description

Definition at line 367 of file dart_api_state.h.

Constructor & Destructor Documentation

◆ LocalHandles()

dart::LocalHandles::LocalHandles ( )
inline

Definition at line 371 of file dart_api_state.h.

375 if (FLAG_trace_handles) {
376 OS::PrintErr("*** Starting a new Local handle block 0x%" Px "\n",
377 reinterpret_cast<intptr_t>(this));
378 }
379 }
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static constexpr int kLocalHandlesPerChunk
static constexpr int kOffsetOfRawPtrInLocalHandle
static constexpr int kLocalHandleSizeInWords
#define Px
Definition: globals.h:410

◆ ~LocalHandles()

dart::LocalHandles::~LocalHandles ( )
inline

Definition at line 380 of file dart_api_state.h.

380 {
381 if (FLAG_trace_handles) {
382 OS::PrintErr("*** Handle Counts for 0x(%" Px "):Scoped = %d\n",
383 reinterpret_cast<intptr_t>(this), CountHandles());
384 OS::PrintErr("*** Deleting Local handle block 0x%" Px "\n",
385 reinterpret_cast<intptr_t>(this));
386 }
387 }
int CountHandles() const

Member Function Documentation

◆ AllocateHandle()

LocalHandle * dart::LocalHandles::AllocateHandle ( )
inline

Definition at line 406 of file dart_api_state.h.

406 {
407 return reinterpret_cast<LocalHandle*>(AllocateScopedHandle());
408 }

◆ CountHandles()

int dart::LocalHandles::CountHandles ( ) const
inline

◆ IsValidHandle()

bool dart::LocalHandles::IsValidHandle ( Dart_Handle  object) const
inline

Definition at line 411 of file dart_api_state.h.

411 {
412 return IsValidScopedHandle(reinterpret_cast<uword>(object));
413 }
uintptr_t uword
Definition: globals.h:501

◆ Reset()

void dart::LocalHandles::Reset ( )
inline

◆ VisitObjectPointers()

void dart::LocalHandles::VisitObjectPointers ( ObjectPointerVisitor visitor)
inline

Definition at line 390 of file dart_api_state.h.

390 {
391 visitor->set_gc_root_type("local handle");
394 visitor->clear_gc_root_type();
395 }
void VisitObjectPointers(ObjectPointerVisitor *visitor)

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