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>
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>();
static V8_INLINE internal::Address * NewFromNonEmptyValue(Isolate *isolate, T *that, internal::Address **slot, internal::TracedReferenceStoreMode store_mode, internal::TracedReferenceHandling reference_handling)
BasicTracedReference()=default
V8_INLINE BasicTracedReference< S > & As() const
Local< T > Get(Isolate *isolate) const
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
friend bool operator==(const TracedReferenceBase &, const Local< U > &)
V8_EXPORT void CheckValue() const
V8_INLINE Local< Data > Get(Isolate *isolate) const
const internal::Address * GetSlotThreadSafe() const
void SetSlotThreadSafe(internal::Address *new_val)
V8_INLINE TracedReferenceBase()=default
bool IsEmptyThreadSafe() const
V8_INLINE void Reset(Isolate *isolate, const Local< S > &other)
TracedReference(Isolate *isolate, Local< S > that)
V8_INLINE TracedReference(const TracedReference &other)
V8_INLINE TracedReference(TracedReference &&other) noexcept
V8_INLINE TracedReference & operator=(TracedReference< S > &&rhs) noexcept
V8_INLINE TracedReference< S > & As() const
V8_INLINE TracedReference & operator=(const TracedReference< S > &rhs)
V8_INLINE TracedReference(TracedReference< S > &&other) noexcept
V8_INLINE TracedReference(const TracedReference< S > &other)
V8_INLINE TracedReference()=default
V8_INLINE void Reset(Isolate *isolate, const Local< S > &other, IsDroppable)
TracedReference(Isolate *isolate, Local< S > that, IsDroppable)
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)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats store(v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) DEFINE_GENERIC_IMPLICATION(trace_gc_object_stats
void DisposeTracedReference(internal::Address *location)
void CopyTracedReference(const internal::Address *const *from, internal::Address **to)
i::Address * GlobalizeTracedReference(i::Isolate *i_isolate, i::Address value, internal::Address *slot, TracedReferenceStoreMode store_mode, TracedReferenceHandling reference_handling)
void MoveTracedReference(internal::Address **from, internal::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)