5#ifndef V8_WASM_STACKS_H_
6#define V8_WASM_STACKS_H_
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
54 static std::unique_ptr<StackMemory>
New() {
55 return std::unique_ptr<StackMemory>(
new StackMemory());
77 constexpr int kStackBaseSafetyOffset = 0;
79 return memory_limit - kStackBaseSafetyOffset;
88 if (
reinterpret_cast<Address>(segment->limit_) <= addr &&
89 addr < segment->
base()) {
104 size += segment->size_;
105 segment = segment->next_segment_;
112 memset(segment->limit_, value, segment->size_);
113 segment = segment->next_segment_;
222 void Add(std::unique_ptr<StackMemory> stack);
StackSegment * prev_segment_
StackSegment * next_segment_
StackSegment(size_t size)
static std::unique_ptr< StackMemory > New()
static constexpr uint32_t stack_switch_target_sp_offset()
bool Contains(Address addr)
void ShrinkTo(Address stack_address)
static constexpr uint32_t jmpbuf_offset()
void set_index(size_t index)
const StackSwitchInfo & stack_switch_info() const
void clear_stack_switch_info()
void FillWith(uint8_t value)
StackSegment * first_segment_
void set_stack_switch_info(Address fp, Address sp)
StackSegment * active_segment_
static constexpr int kJSLimitOffsetKB
StackSwitchInfo stack_switch_info_
bool Grow(Address current_fp)
static constexpr uint32_t stack_switch_source_fp_offset()
static StackMemory * GetCentralStackView(Isolate *isolate)
std::unique_ptr< StackMemory > GetOrAllocate()
std::vector< std::unique_ptr< StackMemory > > freelist_
void Add(std::unique_ptr< StackMemory > stack)
static constexpr int kMaxSize
void ReleaseFinishedStacks()
constexpr int kStackStateOffset
constexpr int kStackSpOffset
constexpr int kStackFpOffset
constexpr int kStackParentOffset
constexpr int kStackLimitOffset
constexpr int kStackPcOffset
constexpr int kSystemPointerSize
static constexpr Address kNullAddress
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 * MB
#define OFFSET_OF(type, field)