5#ifndef INCLUDE_V8_TRACED_HANDLE_H_
6#define INCLUDE_V8_TRACED_HANDLE_H_
28class BasicTracedReferenceExtractor;
87 reinterpret_cast<std::atomic<void*>*
>(&
slot())->store(
88 new_val, std::memory_order_relaxed);
95 return reinterpret_cast<std::atomic<const void*> const*
>(&
slot())->load(
96 std::memory_order_relaxed);
102 template <
typename F>
104 template <
typename U>
140#ifdef V8_ENABLE_CHECKS
143 return this->
template value<T>();
160 template <
typename F>
163 template <
typename F>
165 template <
typename F>
167 template <
typename F>
196 static_assert(std::is_base_of<T, S>::value,
"type check");
200 this->slot() = this->NewFromNonEmptyValue(
201 isolate, *that, &this->slot(),
217 static_assert(std::is_base_of<T, S>::value,
"type check");
221 this->slot() = this->NewFromNonEmptyValue(
222 isolate, *that, &this->slot(),
233 *
this = std::move(other);
240 template <
typename S>
243 *
this = std::move(other);
259 template <
typename S>
315 reinterpret_cast<internal::Isolate*
>(isolate),
348 return !(lhs == rhs);
354 return !(lhs == rhs);
360 return !(rhs == lhs);
366 static_assert(std::is_base_of<T, S>::value,
"type check");
371 this->SetSlotThreadSafe(this->NewFromNonEmptyValue(
372 isolate, *other, &this->slot(),
381 static_assert(std::is_base_of<T, S>::value,
"type check");
386 this->SetSlotThreadSafe(this->NewFromNonEmptyValue(
387 isolate, *other, &this->slot(),
396 static_assert(std::is_base_of<T, S>::value,
"type check");
397 *
this = std::move(rhs.template As<T>());
405 static_assert(std::is_base_of<T, S>::value,
"type check");
406 *
this = rhs.template As<T>();
V8_INLINE T * operator->() const
V8_INLINE BasicTracedReference< S > & As() const
Local< T > Get(Isolate *isolate) const
friend class TracedReference
friend class BasicTracedReference
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
const void * GetSlotThreadSafe() const
V8_EXPORT void CheckValue() const
friend class internal::BasicTracedReferenceExtractor
friend bool operator==(const TracedReferenceBase &, const Local< U > &)
V8_INLINE Local< Value > Get(Isolate *isolate) const
bool IsEmptyThreadSafe() const
V8_INLINE TracedReferenceBase()=default
void SetSlotThreadSafe(void *new_val)
V8_INLINE void Reset(Isolate *isolate, const Local< S > &other)
V8_INLINE TracedReference(TracedReference &&other) noexcept
V8_INLINE TracedReference & operator=(TracedReference< S > &&rhs) noexcept
V8_INLINE TracedReference & operator=(const TracedReference< S > &rhs)
TracedReference(Isolate *isolate, Local< S > that, IsDroppable)
V8_INLINE TracedReference(const TracedReference &other)
V8_INLINE void Reset(Isolate *isolate, const Local< S > &other, IsDroppable)
V8_INLINE TracedReference< S > & As() const
TracedReference(Isolate *isolate, Local< S > that)
V8_INLINE TracedReference()=default
V8_INLINE TracedReference(TracedReference< S > &&other) noexcept
V8_INLINE TracedReference(const TracedReference< S > &other)
V8_INLINE TracedReference & operator=(TracedReference &&rhs) noexcept
V8_INLINE bool IsEmpty() const
V8_INLINE internal::Address *const & slot() const
static V8_INLINE bool EqualHandles(const T1 &lhs, const T2 &rhs)
static V8_INLINE Address ValueAsAddress(const T *value)
V8_EXPORT internal::Address * GlobalizeTracedReference(internal::Isolate *isolate, internal::Address value, internal::Address *slot, TracedReferenceStoreMode store_mode, internal::TracedReferenceHandling reference_handling)
V8_EXPORT void CopyTracedReference(const internal::Address *const *from, internal::Address **to)
V8_EXPORT void MoveTracedReference(internal::Address **from, internal::Address **to)
V8_EXPORT void DisposeTracedReference(internal::Address *global_handle)
V8_INLINE bool operator==(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
V8_INLINE bool operator!=(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
#define V8_UNLIKELY(condition)