5#ifndef INCLUDE_V8_HANDLE_BASE_H_
6#define INCLUDE_V8_HANDLE_BASE_H_
12template <
bool check_statically_enabled>
33#if V8_HAS_ATTRIBUTE_TRIVIAL_ABI
36 StackAllocated& operator=(
const StackAllocated&) =
default;
71 : location_(location) {}
84 template <
typename T,
bool check_null = false>
86 return internal::ValueHelper::SlotAsValue<T, check_null>(
slot());
93#ifdef V8_ENABLE_DIRECT_LOCAL
99class DirectHandleBase {
103 return ptr_ == internal::ValueHelper::kEmpty;
107 V8_INLINE void Clear() { ptr_ = internal::ValueHelper::kEmpty; }
110 friend class internal::ValueHelper;
111 friend class internal::HandleHelper;
114 V8_INLINE DirectHandleBase(
const DirectHandleBase& other) =
default;
115 V8_INLINE DirectHandleBase& operator=(
const DirectHandleBase& that) =
default;
117 V8_INLINE explicit DirectHandleBase(internal::Address ptr) : ptr_(ptr) {}
120 V8_INLINE internal::Address ptr()
const {
return ptr_; }
124 template <
typename T,
bool check_null = false>
126 return reinterpret_cast<T*
>(ptr_);
130 internal::Address ptr_ = internal::ValueHelper::kEmpty;
V8_INLINE internal::Address ptr() const
V8_INLINE T * value() const
V8_INLINE bool IsEmpty() const
V8_INLINE IndirectHandleBase()=default
V8_INLINE internal::Address *const & slot() const
V8_INLINE IndirectHandleBase(const IndirectHandleBase &other)=default
V8_INLINE IndirectHandleBase & operator=(const IndirectHandleBase &that)=default
V8_INLINE IndirectHandleBase(internal::Address *location)
V8_INLINE internal::Address *& slot()
V8_INLINE StackAllocated()
V8_INLINE StackAllocated(const StackAllocated &other, no_checking_tag tag)
V8_EXPORT void VerifyOnStack() const
V8_INLINE StackAllocated(no_checking_tag tag)
V8_INLINE void VerifyOnStack() const
static constexpr no_checking_tag do_not_check
V8_INLINE StackAllocated()=default
V8_INLINE StackAllocated(no_checking_tag)
V8_INLINE StackAllocated(const StackAllocated &other, no_checking_tag)