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");
359 this->SetSlotThreadSafe(this->NewFromNonEmptyValue(
360 isolate, *other, &this->slot(),
369 static_assert(std::is_base_of<T, S>::value,
"type check");
374 this->SetSlotThreadSafe(this->NewFromNonEmptyValue(
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>();
Definition: v8-traced-handle.h:124
BasicTracedReference< S > & As() const
Definition: v8-traced-handle.h:132
Local< T > Get(Isolate *isolate) const
Definition: v8-traced-handle.h:129
friend class BasicTracedReference
Definition: v8-traced-handle.h:154
Definition: v8-isolate.h:212
Definition: v8-local-handle.h:266
static Local< T > New(Isolate *isolate, Local< T > that)
Definition: v8-local-handle.h:346
Definition: v8-object.h:233
Definition: v8-function-callback.h:41
Definition: v8-traced-handle.h:54
Local< Data > Get(Isolate *isolate) const
Definition: v8-traced-handle.h:68
void Reset()
Definition: v8-traced-handle.h:309
const internal::Address * GetSlotThreadSafe() const
Definition: v8-traced-handle.h:93
TracedReferenceBase()=default
friend class internal::BasicTracedReferenceExtractor
Definition: v8-traced-handle.h:100
friend bool operator==(const TracedReferenceBase &, const Local< U > &)
Definition: v8-traced-handle.h:323
void SetSlotThreadSafe(internal::Address *new_val)
Definition: v8-traced-handle.h:85
bool IsEmptyThreadSafe() const
Definition: v8-traced-handle.h:77
Definition: v8-traced-handle.h:165
TracedReference(TracedReference &&other) noexcept
Definition: v8-traced-handle.h:219
TracedReference(Isolate *isolate, Local< S > that)
Definition: v8-traced-handle.h:183
TracedReference(const TracedReference &other)
Definition: v8-traced-handle.h:238
TracedReference< S > & As() const
Definition: v8-traced-handle.h:290
TracedReference(TracedReference< S > &&other) noexcept
Definition: v8-traced-handle.h:229
TracedReference()=default
TracedReference & operator=(const TracedReference< S > &rhs)
TracedReference(const TracedReference< S > &other)
Definition: v8-traced-handle.h:248
TracedReference & operator=(TracedReference< S > &&rhs) noexcept
TracedReference(Isolate *isolate, Local< S > that, IsDroppable)
Definition: v8-traced-handle.h:203
TracedReference & operator=(TracedReference &&rhs) noexcept
Definition: v8-traced-handle.h:399
Definition: v8-handle-base.h:53
internal::Address *const & slot() const
Definition: v8-handle-base.h:79
bool IsEmpty() const
Definition: v8-handle-base.h:56
static bool EqualHandles(const T1 &lhs, const T2 &rhs)
Definition: v8-internal.h:1726
static Address ValueAsAddress(const T *value)
Definition: v8-internal.h:1687
Address * GlobalizeTracedReference(Isolate *isolate, Address value, Address *slot, TracedReferenceStoreMode store_mode, TracedReferenceHandling reference_handling)
void MoveTracedReference(Address **from, Address **to)
TracedReferenceHandling
Definition: v8-traced-handle.h:35
TracedReferenceStoreMode
Definition: v8-traced-handle.h:30
void CopyTracedReference(const Address *const *from, Address **to)
void DisposeTracedReference(Address *global_handle)
uintptr_t Address
Definition: v8-internal.h:51
Definition: libplatform.h:15
bool operator!=(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
Definition: v8-traced-handle.h:334
bool operator==(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
Definition: v8-traced-handle.h:317
Definition: v8-traced-handle.h:167
#define V8_EXPORT
Definition: v8config.h:793
#define V8_INLINE
Definition: v8config.h:499
#define V8_UNLIKELY(condition)
Definition: v8config.h:649