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;
46#ifdef ENABLE_SLOW_DCHECKS
88 template <
typename T,
bool check_null = false>
93#ifdef V8_ENABLE_DIRECT_HANDLE
107#ifdef V8_ENABLE_DIRECT_HANDLE
113class DirectHandleBase {
117 return ptr_ == internal::ValueHelper::kEmpty;
121 V8_INLINE void Clear() {
ptr_ = internal::ValueHelper::kEmpty; }
124 friend class internal::ValueHelper;
125 friend class internal::HandleHelper;
128 V8_INLINE DirectHandleBase(
const DirectHandleBase& other) =
default;
129 V8_INLINE DirectHandleBase& operator=(
const DirectHandleBase& that) =
default;
131 V8_INLINE explicit DirectHandleBase(internal::Address ptr) :
ptr_(ptr) {}
138 template <
typename T,
bool check_null = false>
140 return reinterpret_cast<T*
>(
ptr_);
143 V8_INLINE internal::ValueHelper::InternalRepresentationType repr()
const {
148 internal::Address
ptr_ = internal::ValueHelper::kEmpty;
V8_INLINE internal::Address ptr() const
V8_INLINE internal::ValueHelper::InternalRepresentationType repr() const
V8_INLINE T * value() const
V8_INLINE IndirectHandleBase()=default
V8_INLINE internal::Address *& slot()
V8_INLINE IndirectHandleBase(internal::Address *location)
V8_INLINE bool IsEmpty() const
V8_INLINE internal::Address *const & slot() const
V8_INLINE IndirectHandleBase(const IndirectHandleBase &other)=default
V8_INLINE IndirectHandleBase & operator=(const IndirectHandleBase &that)=default
internal::Address * location_
V8_INLINE StackAllocated()
V8_INLINE V8_EXPORT void VerifyOnStack() const
V8_INLINE StackAllocated(const StackAllocated &other, no_checking_tag tag)
V8_INLINE StackAllocated(no_checking_tag tag)
V8_INLINE void VerifyOnStack() const
V8_INLINE StackAllocated()=default
static constexpr no_checking_tag do_not_check
V8_INLINE StackAllocated(const StackAllocated &other, no_checking_tag)
V8_INLINE StackAllocated(no_checking_tag)
static V8_INLINE T * SlotAsValue(S *slot)
internal::Address * InternalRepresentationType
static constexpr InternalRepresentationType kEmpty
std::unique_ptr< ValueMirror > value