5#ifndef INCLUDE_V8_TRACED_HANDLE_H_
6#define INCLUDE_V8_TRACED_HANDLE_H_
28class BasicTracedReferenceExtractor;
56 static_assert(
sizeof(std::atomic<internal::Address*>) ==
86 reinterpret_cast<std::atomic<internal::Address*>*
>(&
slot())->store(
87 new_val, std::memory_order_relaxed);
94 return reinterpret_cast<const std::atomic<internal::Address*>*
>(&
slot())
95 ->load(std::memory_order_relaxed);
101 template <
typename F>
103 template <
typename U>
148 template <
typename F>
151 template <
typename F>
153 template <
typename F>
155 template <
typename F>
184 static_assert(std::is_base_of<T, S>::value,
"type check");
188 this->slot() = this->NewFromNonEmptyValue(
189 isolate, *that, &this->
slot(),
205 static_assert(std::is_base_of<T, S>::value,
"type check");
209 this->slot() = this->NewFromNonEmptyValue(
210 isolate, *that, &this->
slot(),
221 *
this = std::move(other);
228 template <
typename S>
231 *
this = std::move(other);
247 template <
typename S>
303 reinterpret_cast<internal::Isolate*
>(isolate),
336 return !(lhs == rhs);
342 return !(lhs == rhs);
348 return !(rhs == lhs);
354 static_assert(std::is_base_of<T, S>::value,
"type check");
360 isolate, *other, &this->slot(),
369 static_assert(std::is_base_of<T, S>::value,
"type check");
375 isolate, *other, &this->slot(),
384 static_assert(std::is_base_of<T, S>::value,
"type check");
385 *
this = std::move(rhs.template
As<T>());
393 static_assert(std::is_base_of<T, S>::value,
"type check");
394 *
this = rhs.template
As<T>();
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)
V8_INLINE Local< Data > Get(Isolate *isolate) const
friend bool operator==(const TracedReferenceBase &, const Local< U > &)
void SetSlotThreadSafe(internal::Address *new_val)
V8_EXPORT void CheckValue() const
friend class internal::BasicTracedReferenceExtractor
const internal::Address * GetSlotThreadSafe() const
bool IsEmptyThreadSafe() const
V8_INLINE TracedReferenceBase()=default
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 T * value() const
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 void MoveTracedReference(Address **from, Address **to)
V8_EXPORT Address * GlobalizeTracedReference(Isolate *isolate, Address value, Address *slot, TracedReferenceStoreMode store_mode, TracedReferenceHandling reference_handling)
V8_EXPORT void DisposeTracedReference(Address *global_handle)
V8_EXPORT void CopyTracedReference(const Address *const *from, Address **to)
V8_INLINE bool operator==(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
V8_INLINE bool operator!=(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
#define V8_UNLIKELY(condition)