#include <dart_api_state.h>
Definition at line 427 of file dart_api_state.h.
◆ PersistentHandles()
dart::PersistentHandles::PersistentHandles |
( |
| ) |
|
|
inline |
Definition at line 431 of file dart_api_state.h.
435 free_list_(nullptr) {
436 if (FLAG_trace_handles) {
437 OS::PrintErr(
"*** Starting a new Persistent handle block 0x%" Px "\n",
438 reinterpret_cast<intptr_t>(this));
439 }
440 }
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static constexpr int kPersistentHandlesPerChunk
static constexpr int kPersistentHandleSizeInWords
static constexpr int kOffsetOfRawPtrInPersistentHandle
◆ ~PersistentHandles()
dart::PersistentHandles::~PersistentHandles |
( |
| ) |
|
|
inline |
Definition at line 441 of file dart_api_state.h.
441 {
442 free_list_ = nullptr;
443 if (FLAG_trace_handles) {
447 reinterpret_cast<intptr_t>(this));
448 }
449 }
◆ AllocateHandle()
Definition at line 471 of file dart_api_state.h.
471 {
472 PersistentHandle* handle;
473 if (free_list_ != nullptr) {
474 handle = free_list_;
475 free_list_ = handle->Next();
476 } else {
478 }
480 return handle;
481 }
uword AllocateScopedHandle()
void set_ptr(ObjectPtr ref)
◆ CountHandles()
int dart::PersistentHandles::CountHandles |
( |
| ) |
const |
|
inline |
◆ free_list()
◆ FreeHandle()
Definition at line 483 of file dart_api_state.h.
483 {
486 }
PersistentHandle * free_list() const
void set_free_list(PersistentHandle *value)
◆ IsFreeHandle()
Definition at line 493 of file dart_api_state.h.
493 {
494 PersistentHandle* handle = free_list_;
495 while (handle != nullptr) {
496 if (handle == reinterpret_cast<PersistentHandle*>(object)) {
497 return true;
498 }
499 handle = handle->Next();
500 }
501 return false;
502 }
◆ IsValidHandle()
Definition at line 489 of file dart_api_state.h.
489 {
491 }
bool IsValidScopedHandle(uword handle) const
◆ set_free_list()
◆ Visit()
Definition at line 464 of file dart_api_state.h.
464 {
467 }
void Visit(HandleVisitor *visitor)
◆ VisitObjectPointers()
Definition at line 456 of file dart_api_state.h.
456 {
457 visitor->set_gc_root_type("persistent handle");
460 visitor->clear_gc_root_type();
461 }
void VisitObjectPointers(ObjectPointerVisitor *visitor)
The documentation for this class was generated from the following file: