26static bool IsCurrentApiNativeScope(
Zone* zone) {
28 return (scope !=
nullptr) && (scope->
zone() == zone);
37 *
reinterpret_cast<uword*
>(handle + kOffsetOfIsZoneHandle *
kWordSize) = 0;
47 *
reinterpret_cast<uword*
>(handle + kOffsetOfIsZoneHandle *
kWordSize) = 1;
53bool VMHandles::IsZoneHandle(
uword handle) {
54 return *
reinterpret_cast<uword*
>(handle +
73void HandleScope::Initialize() {
76 ASSERT(handles !=
nullptr);
77 saved_handle_block_ = handles->scoped_blocks_;
78 saved_handle_slot_ = handles->scoped_blocks_->next_handle_slot();
92 ASSERT(handles !=
nullptr);
94 VMHandles::HandlesBlock* last = handles->scoped_blocks_;
96 handles->scoped_blocks_ = saved_handle_block_;
97 handles->scoped_blocks_->set_next_handle_slot(saved_handle_slot_);
99 VMHandles::HandlesBlock* block = handles->scoped_blocks_;
101 block->ZapFreeHandles();
102 if (block == last)
break;
103 block = block->next_block();
#define DEBUG_ASSERT(cond)
static ApiNativeScope * Current()
HandleScope(ThreadState *thread)
int CountZoneHandles() const
int CountScopedHandles() const
ThreadState * thread() const
void set_top_handle_scope(HandleScope *handle_scope)
HandleScope * top_handle_scope() const
static Thread * Current()
static int ZoneHandleCount()
static uword AllocateZoneHandle(Zone *zone)
static uword AllocateHandle(Zone *zone)
void VisitObjectPointers(ObjectPointerVisitor *visitor)
static int ScopedHandleCount()
static constexpr int kVMHandleSizeInWords
static constexpr int kVMHandlesPerChunk
static constexpr int kOffsetOfRawPtr
constexpr intptr_t kWordSize