5#ifndef INCLUDE_V8_TRACED_HANDLE_H_
6#define INCLUDE_V8_TRACED_HANDLE_H_
28class BasicTracedReferenceExtractor;
51
52
53
60
61
62
66
67
70 return Local<Data>::New(isolate,
this->value<Data>());
74
75
76
83
84
87 new_val, std::memory_order_relaxed);
91
92
95 ->load(std::memory_order_relaxed);
100 friend class internal::BasicTracedReferenceExtractor;
101 template <
typename F>
103 template <
typename U>
110
111
112
113
114
115
116
117
118
119
120
121
122
127
128
139
140
141 BasicTracedReference() =
default;
148 template <
typename F>
151 template <
typename F>
153 template <
typename F>
155 template <
typename F>
160
161
162
163
172
173
177
178
179
180
181
184 static_assert(std::is_base_of_v<T, S>,
"type check");
188 this->slot() =
this->NewFromNonEmptyValue(
189 isolate, *that, &
this->slot(),
195
196
197
198
199
200
201
205 static_assert(std::is_base_of_v<T, S>,
"type check");
209 this->slot() =
this->NewFromNonEmptyValue(
210 isolate, *that, &
this->slot(),
216
217
218
221 *
this = std::move(other);
225
226
227
228 template <
typename S>
231 *
this = std::move(other);
235
236
237
244
245
246
247 template <
typename S>
254
255
259
260
265
266
270
271
276
277
278
283
284
285
303 reinterpret_cast<
internal::Isolate*>(isolate)
,
304 internal::ValueHelper::ValueAsAddress(that)
,
319 return internal::HandleHelper::EqualHandles(lhs, rhs);
325 return internal::HandleHelper::EqualHandles(lhs, rhs);
336 return !(lhs
== rhs);
342 return !(lhs == rhs);
348 return !(rhs == lhs);
354 static_assert(std::is_base_of_v<T, S>,
"type check");
359 this->SetSlotThreadSafe(
this->NewFromNonEmptyValue(
360 isolate, *other, &
this->slot(),
369 static_assert(std::is_base_of_v<T, S>,
"type check");
374 this->SetSlotThreadSafe(
this->NewFromNonEmptyValue(
375 isolate, *other, &
this->slot(),
384 static_assert(std::is_base_of_v<T, S>,
"type check");
385 *
this = std::move(rhs.
template As<T>());
393 static_assert(std::is_base_of_v<T, S>,
"type check");
394 *
this = rhs.
template As<T>();
411 if (!rhs.IsEmpty()) {
V8_INLINE BasicTracedReference< S > & As() const
Local< T > Get(Isolate *isolate) const
friend class TracedReference
friend class BasicTracedReference
V8_INLINE Local< Data > Get(Isolate *isolate) const
void SetSlotThreadSafe(internal::Address *new_val)
V8_EXPORT void CheckValue() const
friend bool operator==(const TracedReferenceBase &, const Local< U > &)
const internal::Address * GetSlotThreadSafe() const
bool IsEmptyThreadSafe() const
V8_INLINE TracedReferenceBase()=default
friend bool operator==(const TracedReferenceBase &, const TracedReferenceBase &)
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)
V8_INLINE TracedReference & operator=(const TracedReference &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
V8_INLINE internal::Address *& slot()
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 v8::Local< U > &lhs, const TracedReferenceBase &rhs)
V8_INLINE bool operator!=(const TracedReferenceBase &lhs, const v8::Local< U > &rhs)
V8_INLINE bool operator!=(const TracedReferenceBase &lhs, const TracedReferenceBase &rhs)
V8_INLINE bool operator==(const v8::Local< U > &lhs, const TracedReferenceBase &rhs)
#define V8_UNLIKELY(condition)