5#ifndef V8_CODEGEN_RELOC_INFO_H_
6#define V8_CODEGEN_RELOC_INFO_H_
260#ifdef V8_TARGET_ARCH_IA32
357 template <
typename ObjectVisitor>
360#ifdef ENABLE_DISASSEMBLER
362 static const char* RelocModeName(
Mode rmode);
372 constexpr Mode kFirstUnrealRelocMode =
374 return (
ModeMask(kFirstUnrealRelocMode) - 1) &
407 template <
typename RelocIteratorType>
512template <
typename RelocInfoT>
532 const uint8_t*
end,
int mode_mask);
536 if ((
mode_mask_ & (1 << mode)) == 0)
return false;
577 Address const_pool,
int mode_mask = kAllModesMask);
590 const uint8_t*
end,
int mode_mask);
void WriteShortData(uint8_t data_delta)
void WriteModeAndPC(uint32_t pc_delta, RelocInfo::Mode rmode)
RelocInfoWriter & operator=(const RelocInfoWriter &)=delete
void Reposition(uint8_t *pos, uint8_t *pc)
void WriteIntData(int data_delta)
void WriteMode(RelocInfo::Mode rmode)
uint8_t * last_pc() const
void WriteShortTaggedPC(uint32_t pc_delta, int tag)
RelocInfoWriter(const RelocInfoWriter &)=delete
void Write(const RelocInfo *rinfo)
static constexpr int kMaxSize
uint32_t WriteLongPCJump(uint32_t pc_delta)
static constexpr bool IsDeoptReason(Mode mode)
static constexpr int kMaxSmallPCDelta
V8_INLINE Address target_internal_reference()
static constexpr bool IsConstPool(Mode mode)
RelocInfo(Address pc, Mode rmode)
static constexpr bool IsWasmCanonicalSigId(Mode mode)
static bool IsOnlyForSerializer(Mode mode)
static constexpr bool IsDeoptNodeId(Mode mode)
static constexpr bool IsInternalReference(Mode mode)
static constexpr bool IsOffHeapTarget(Mode mode)
static constexpr bool IsGCRelocMode(Mode mode)
static const int kApplyMask
void set_off_heap_target_address(Address target, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
static constexpr bool IsShareableRelocMode(Mode mode)
uint32_t wasm_call_tag() const
static constexpr bool IsRelativeCodeTarget(Mode mode)
static constexpr bool IsCodeTargetMode(Mode mode)
static constexpr int AllRealModesMask()
static constexpr int ModeMask(Mode mode)
static constexpr bool IsCompressedEmbeddedObject(Mode mode)
V8_INLINE Address target_address()
void Visit(Tagged< InstructionStream > host, ObjectVisitor *visitor)
static constexpr bool IsNearBuiltinEntry(Mode mode)
static constexpr bool IsInternalReferenceEncoded(Mode mode)
static constexpr int kMaxCallSize
V8_EXPORT_PRIVATE uint32_t wasm_canonical_sig_id() const
V8_INLINE Address target_internal_reference_address()
static constexpr bool IsCodeTarget(Mode mode)
static int PostCodegenRelocationMask()
static constexpr bool IsWasmCall(Mode mode)
V8_INLINE int target_address_size()
static constexpr bool IsDeoptId(Mode mode)
V8_INLINE Builtin target_builtin_at(Assembler *origin)
V8_INLINE WasmCodePointer wasm_code_pointer_table_entry() const
V8_INLINE Address target_off_heap_target()
static constexpr bool IsWasmStubCall(Mode mode)
static constexpr bool IsJSDispatchHandle(Mode mode)
static constexpr bool IsEmbeddedObjectMode(Mode mode)
static constexpr bool IsRealRelocMode(Mode mode)
static constexpr bool IsExternalReference(Mode mode)
V8_INLINE Address target_external_reference()
Address constant_pool() const
V8_INLINE Tagged< HeapObject > target_object(PtrComprCageBase cage_base)
V8_INLINE Address constant_pool_entry_address()
Address wasm_call_address() const
static bool OffHeapTargetIsCodedSpecially()
V8_INLINE JSDispatchHandle js_dispatch_handle()
V8_INLINE DirectHandle< HeapObject > target_object_handle(Assembler *origin)
static constexpr bool IsWasmCodePointerTableEntry(Mode mode)
static constexpr bool IsFullEmbeddedObject(Mode mode)
@ WASM_CODE_POINTER_TABLE_ENTRY
@ COMPRESSED_EMBEDDED_OBJECT
@ FIRST_EMBEDDED_OBJECT_RELOC_MODE
@ FIRST_BUILTIN_ENTRY_MODE
@ INTERNAL_REFERENCE_ENCODED
@ LAST_EMBEDDED_OBJECT_RELOC_MODE
@ LAST_BUILTIN_ENTRY_MODE
@ FIRST_SHAREABLE_RELOC_MODE
static int JSDispatchHandleModeMask()
bool HasTargetAddressAddress() const
static constexpr bool IsBuiltinEntryMode(Mode mode)
RelocInfo(Address pc, Mode rmode, intptr_t data, Address constant_pool=kNullAddress)
V8_INLINE Address target_address_address()
static constexpr int kMinRelocCommentSize
static constexpr bool IsVeneerPool(Mode mode)
static constexpr bool IsDeoptPosition(Mode mode)
static constexpr bool IsNoInfo(Mode mode)
static int EmbeddedObjectModeMask()
Address wasm_stub_call_address() const
void AdvanceReadLongPCJump()
static constexpr int kAllModesMask
bool SetMode(RelocInfo::Mode mode)
void Advance(int bytes=1)
RelocInfo::Mode GetMode() const
const uint8_t *const end_
RelocIteratorBase(RelocIteratorBase &&) V8_NOEXCEPT=default
RelocIterator(RelocIterator &&) V8_NOEXCEPT=default
void set_wasm_call_address(Address)
V8_INLINE void set_target_object(Tagged< InstructionStream > host, Tagged< HeapObject > target, WriteBarrierMode write_barrier_mode=UPDATE_WRITE_BARRIER, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
V8_INLINE WritableJitAllocation & jit_allocation()
WritableRelocInfo(WritableJitAllocation &jit_allocation, Address pc, Mode rmode, intptr_t data, Address constant_pool)
WritableRelocInfo(WritableJitAllocation &jit_allocation, Address pc, Mode rmode)
void set_js_dispatch_handle(Tagged< InstructionStream > host, JSDispatchHandle handle, WriteBarrierMode write_barrier_mode=UPDATE_WRITE_BARRIER, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
void set_wasm_stub_call_address(Address)
void set_target_address(Tagged< InstructionStream > host, Address target, WriteBarrierMode write_barrier_mode=UPDATE_WRITE_BARRIER, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
WritableJitAllocation & jit_allocation_
V8_INLINE void set_wasm_code_pointer_table_entry(WasmCodePointer, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
V8_INLINE void apply(intptr_t delta)
V8_INLINE void set_target_external_reference(Address, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
void set_wasm_canonical_sig_id(uint32_t)
#define COMPRESS_POINTERS_BOOL
#define EXPORT_TEMPLATE_DECLARE(export)
constexpr bool IsInRange(T value, U lower_limit, U higher_limit)
constexpr int kDefaultTag
constexpr int kCodeTargetTag
constexpr int kWasmStubCallTag
constexpr int kSmallPCDeltaMask
constexpr int kLongTagBits
constexpr int kEmbeddedObjectTag
constexpr int kSmallPCDeltaBits
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
constexpr int kBitsPerByte
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 TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long mode(MIPS/PPC only)") DEFINE_BOOL(partial_constant_pool
void Print(Tagged< Object > obj)
constexpr int kSystemPointerSize
constexpr int kBitsPerInt
static constexpr Address kNullAddress
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define V8_EXPORT_PRIVATE