v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::wasm::WasmBytecodeGenerator Class Reference

#include <wasm-interpreter.h>

Collaboration diagram for v8::internal::wasm::WasmBytecodeGenerator:

Classes

struct  BlockData
 
class  RollbackStack
 
struct  Simd128Hash
 

Public Types

typedef void(WasmBytecodeGenerator::*) MemIndexPushFunc(bool emit)
 
typedef void(WasmBytecodeGenerator::*) MemIndexPopFunc(bool emit)
 

Public Member Functions

 WasmBytecodeGenerator (uint32_t function_index, InterpreterCode *wasm_code, const WasmModule *module)
 
std::unique_ptr< WasmBytecodeGenerateBytecode ()
 

Static Public Member Functions

static void PrintBytecodeCompressionStats ()
 

Private Member Functions

uint32_t const_slots_start () const
 
uint32_t GetStackFrameSize () const
 
uint32_t CurrentCodePos () const
 
WasmInstruction DecodeInstruction (pc_t pc, Decoder &decoder)
 
void DecodeGCOp (WasmOpcode opcode, WasmInstruction::Optional *optional, Decoder *decoder, InterpreterCode *code, pc_t pc, int *const len)
 
void DecodeNumericOp (WasmOpcode opcode, WasmInstruction::Optional *optional, Decoder *decoder, InterpreterCode *code, pc_t pc, int *const len)
 
void DecodeAtomicOp (WasmOpcode opcode, WasmInstruction::Optional *optional, Decoder *decoder, InterpreterCode *code, pc_t pc, int *const len)
 
bool DecodeSimdOp (WasmOpcode opcode, WasmInstruction::Optional *optional, Decoder *decoder, InterpreterCode *code, pc_t pc, int *const len)
 
bool ToRegisterIsAllowed (const WasmInstruction &instr)
 
RegMode EncodeInstruction (const WasmInstruction &instr, RegMode curr_reg_mode, RegMode next_reg_mode)
 
RegMode DoEncodeInstruction (const WasmInstruction &instr, RegMode curr_reg_mode, RegMode next_reg_mode)
 
bool EncodeSuperInstruction (RegMode &reg_mode, const WasmInstruction &curr_instr, const WasmInstruction &next_instr)
 
bool DoEncodeSuperInstruction (RegMode &reg_mode, const WasmInstruction &curr_instr, const WasmInstruction &next_instr)
 
uint32_t ScanConstInstructions () const
 
void Emit (const void *buff, size_t len)
 
void I32Push (bool emit=true)
 
void I64Push (bool emit=true)
 
void MemIndexPush (bool emit=true)
 
void ITableIndexPush (bool is_table64, bool emit=true)
 
void F32Push (bool emit=true)
 
void F64Push (bool emit=true)
 
void S128Push (bool emit=true)
 
void RefPush (ValueType type, bool emit=true)
 
void Push (ValueType type)
 
void I32Pop (bool emit=true)
 
void I64Pop (bool emit=true)
 
void MemIndexPop (bool emit=true)
 
void F32Pop (bool emit=true)
 
void F64Pop (bool emit=true)
 
void S128Pop (bool emit=true)
 
ValueType RefPop (bool emit=true)
 
void Pop (ValueKind kind, bool emit=true)
 
void EmitI16Const (int16_t value)
 
void EmitI32Const (int32_t value)
 
void EmitF32Const (float value)
 
void EmitF64Const (double value)
 
void EmitSlotOffset (uint32_t value)
 
void EmitMemoryOffset (uint64_t value)
 
void EmitStackIndex (int32_t value)
 
void EmitRefStackIndex (int32_t value)
 
void EmitRefValueType (int32_t value)
 
void EmitStructFieldOffset (int32_t value)
 
void EmitFnId (InstructionHandler func_id, uint32_t pc=UINT_MAX)
 
void EmitCopySlot (ValueType value_type, uint32_t from_slot_index, uint32_t to_slot_index, bool copy_from_reg=false)
 
bool IsMemory64 () const
 
bool IsMultiMemory () const
 
ValueKind GetGlobalType (uint32_t index) const
 
void EmitGlobalIndex (uint32_t index)
 
uint32_t ReserveBlockSlots (uint8_t opcode, const WasmInstruction::Optional::Block &block_data, size_t *rets_slots_count, size_t *params_slots_count)
 
void StoreBlockParamsIntoSlots (uint32_t target_block_index, bool update_stack)
 
void StoreBlockParamsAndResultsIntoSlots (uint32_t target_block_index, WasmOpcode opcode)
 
bool HasVoidSignature (const WasmBytecodeGenerator::BlockData &block_data) const
 
uint32_t ParamsCount (const WasmBytecodeGenerator::BlockData &block_data) const
 
ValueType GetParamType (const WasmBytecodeGenerator::BlockData &block_data, size_t index) const
 
uint32_t ReturnsCount (const WasmBytecodeGenerator::BlockData &block_data) const
 
ValueType GetReturnType (const WasmBytecodeGenerator::BlockData &block_data, size_t index) const
 
void PreserveArgsAndLocals ()
 
int32_t BeginBlock (WasmOpcode opcode, const WasmInstruction::Optional::Block signature)
 
void BeginElseBlock (uint32_t if_block_index, bool dummy)
 
int32_t EndBlock (WasmOpcode opcode)
 
void Return ()
 
void EmitBranchOffset (uint32_t delta)
 
void EmitIfElseBranchOffset ()
 
void EmitTryCatchBranchOffset ()
 
void EmitBranchTableOffset (uint32_t delta, uint32_t code_pos)
 
uint32_t GetCurrentBranchDepth () const
 
int32_t GetTargetBranch (uint32_t delta) const
 
int GetCurrentTryBlockIndex (bool return_matching_try_for_catch_blocks) const
 
void PatchBranchOffsets ()
 
void PatchLoopBeginInstructions ()
 
void RestoreIfElseParams (uint32_t if_block_index)
 
bool HasSharedSlot (uint32_t stack_index) const
 
bool FindSharedSlot (uint32_t stack_index, uint32_t *new_slot_index)
 
const FunctionSigGetFunctionSignature (uint32_t function_index) const
 
ValueKind GetTopStackType (RegMode reg_mode) const
 
uint32_t function_index () const
 
uint32_t CreateSlot (ValueType value_type)
 
template<typename T >
uint32_t CreateSlot (ValueType value_type)
 
uint32_t CreateWasmRefSlot (ValueType value_type)
 
template<typename T >
uint32_t GetConstSlot (T value)
 
uint32_t GetI32ConstSlot (int32_t value)
 
uint32_t GetI64ConstSlot (int64_t value)
 
uint32_t GetF32ConstSlot (float value)
 
uint32_t GetF64ConstSlot (double value)
 
uint32_t GetS128ConstSlot (Simd128 value)
 
template<typename T >
uint32_t CreateConstSlot (T value)
 
template<typename T >
uint32_t PushConstSlot (T value)
 
void PushConstSlot (uint32_t slot_index)
 
void PushSlot (uint32_t slot_index)
 
uint32_t _PushSlot (ValueType value_type)
 
void PushCopySlot (uint32_t from_stack_index)
 
uint32_t PopSlot ()
 
void CopyToSlot (ValueType value_type, uint32_t from_slot_index, uint32_t to_stack_index, bool copy_from_reg)
 
void CopyToSlotAndPop (ValueType value_type, uint32_t to, bool is_tee, bool copy_from_reg)
 
void SetSlotType (uint32_t stack_index, ValueType type)
 
void UpdateStack (uint32_t index, uint32_t slot_index)
 
void UpdateStack (uint32_t index, uint32_t slot_index, ValueType value_type)
 
uint32_t stack_top_index () const
 
uint32_t stack_size () const
 
void SetUnreachableMode ()
 
void InitSlotsForFunctionArgs (const FunctionSig *sig, bool is_indirect_call)
 
bool TryCompactInstructionHandler (InstructionHandler func_addr)
 
bool TypeCheckAlwaysSucceeds (ValueType obj_type, HeapType type) const
 
bool TypeCheckAlwaysFails (ValueType obj_type, HeapType expected_type, bool null_succeeds) const
 
 WasmBytecodeGenerator (const WasmBytecodeGenerator &)=delete
 
WasmBytecodeGeneratoroperator= (const WasmBytecodeGenerator &)=delete
 

Private Attributes

std::vector< Slotslots_
 
MemIndexPushFunc int_mem_push_
 
MemIndexPopFunc int_mem_pop_
 
bool is_memory64_
 
std::vector< uint8_t > const_slots_values_
 
uint32_t const_slot_offset_
 
std::unordered_map< int32_t, uint32_t > i32_const_cache_
 
std::unordered_map< int64_t, uint32_t > i64_const_cache_
 
std::unordered_map< float, uint32_t > f32_const_cache_
 
std::unordered_map< double, uint32_t > f64_const_cache_
 
std::unordered_map< Simd128, uint32_t, Simd128Hashs128_const_cache_
 
std::vector< Simd128simd_immediates_
 
uint32_t slot_offset_
 
RollbackStack stack_
 
uint32_t ref_slots_count_
 
uint32_t function_index_
 
InterpreterCodewasm_code_
 
uint32_t args_count_
 
uint32_t args_slots_size_
 
uint32_t return_count_
 
uint32_t rets_slots_size_
 
uint32_t locals_count_
 
std::vector< uint8_t > code_
 
std::vector< BlockDatablocks_
 
int32_t current_block_index_
 
bool is_instruction_reachable_
 
uint32_t unreachable_block_count_
 
base::SmallVector< uint32_t, 8 > br_table_labels_
 
base::SmallVector< uint32_t, 16 > loop_begin_code_offsets_
 
const WasmModulemodule_
 
std::map< CodeOffset, pc_tcode_pc_map_
 
CodeOffset last_instr_offset_
 
WasmEHDataGenerator eh_data_
 
InstrHandlerSize handler_size_
 
bool current_instr_encoding_failed_
 
bool no_nested_emit_instr_handler_guard_
 

Static Private Attributes

static const CodeOffset kInvalidCodeOffset = (CodeOffset)-1
 
static std::atomic< size_ttotal_bytecode_size_ = 0
 
static std::atomic< size_temitted_short_slot_offset_count_ = 0
 
static std::atomic< size_temitted_short_memory_offset_count_
 

Detailed Description

Definition at line 1453 of file wasm-interpreter.h.

Member Typedef Documentation

◆ MemIndexPopFunc

void(WasmBytecodeGenerator::*) v8::internal::wasm::WasmBytecodeGenerator::MemIndexPopFunc(bool emit)

Definition at line 1456 of file wasm-interpreter.h.

◆ MemIndexPushFunc

void(WasmBytecodeGenerator::*) v8::internal::wasm::WasmBytecodeGenerator::MemIndexPushFunc(bool emit)

Definition at line 1455 of file wasm-interpreter.h.

Constructor & Destructor Documentation

◆ WasmBytecodeGenerator() [1/2]

v8::internal::wasm::WasmBytecodeGenerator::WasmBytecodeGenerator ( uint32_t function_index,
InterpreterCode * wasm_code,
const WasmModule * module )

Definition at line 7378 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ WasmBytecodeGenerator() [2/2]

v8::internal::wasm::WasmBytecodeGenerator::WasmBytecodeGenerator ( const WasmBytecodeGenerator & )
privatedelete

Member Function Documentation

◆ _PushSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::_PushSlot ( ValueType value_type)
inlineprivate

Definition at line 1895 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginBlock()

int32_t v8::internal::wasm::WasmBytecodeGenerator::BeginBlock ( WasmOpcode opcode,
const WasmInstruction::Optional::Block signature )
private

Definition at line 13052 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginElseBlock()

void v8::internal::wasm::WasmBytecodeGenerator::BeginElseBlock ( uint32_t if_block_index,
bool dummy )
inlineprivate

Definition at line 573 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ const_slots_start()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::const_slots_start ( ) const
inlineprivate

Definition at line 1524 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ CopyToSlot()

void v8::internal::wasm::WasmBytecodeGenerator::CopyToSlot ( ValueType value_type,
uint32_t from_slot_index,
uint32_t to_stack_index,
bool copy_from_reg )
private

Definition at line 7608 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyToSlotAndPop()

void v8::internal::wasm::WasmBytecodeGenerator::CopyToSlotAndPop ( ValueType value_type,
uint32_t to,
bool is_tee,
bool copy_from_reg )
private

Definition at line 7693 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateConstSlot()

template<typename T >
uint32_t v8::internal::wasm::WasmBytecodeGenerator::CreateConstSlot ( T value)
inlineprivate

Definition at line 1853 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSlot() [1/2]

uint32_t v8::internal::wasm::WasmBytecodeGenerator::CreateSlot ( ValueType value_type)
inlineprivate

Definition at line 1756 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSlot() [2/2]

template<typename T >
uint32_t v8::internal::wasm::WasmBytecodeGenerator::CreateSlot ( ValueType value_type)
inlineprivate

Definition at line 1777 of file wasm-interpreter.h.

Here is the call graph for this function:

◆ CreateWasmRefSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::CreateWasmRefSlot ( ValueType value_type)
inlineprivate

Definition at line 1789 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CurrentCodePos()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::CurrentCodePos ( ) const
inlineprivate

Definition at line 1530 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ DecodeAtomicOp()

void v8::internal::wasm::WasmBytecodeGenerator::DecodeAtomicOp ( WasmOpcode opcode,
WasmInstruction::Optional * optional,
Decoder * decoder,
InterpreterCode * code,
pc_t pc,
int *const len )
private

Definition at line 8558 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeGCOp()

void v8::internal::wasm::WasmBytecodeGenerator::DecodeGCOp ( WasmOpcode opcode,
WasmInstruction::Optional * optional,
Decoder * decoder,
InterpreterCode * code,
pc_t pc,
int *const len )
private

Definition at line 8336 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeInstruction()

WasmInstruction v8::internal::wasm::WasmBytecodeGenerator::DecodeInstruction ( pc_t pc,
Decoder & decoder )
private

Definition at line 7973 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeNumericOp()

void v8::internal::wasm::WasmBytecodeGenerator::DecodeNumericOp ( WasmOpcode opcode,
WasmInstruction::Optional * optional,
Decoder * decoder,
InterpreterCode * code,
pc_t pc,
int *const len )
private

Definition at line 8465 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeSimdOp()

bool v8::internal::wasm::WasmBytecodeGenerator::DecodeSimdOp ( WasmOpcode opcode,
WasmInstruction::Optional * optional,
Decoder * decoder,
InterpreterCode * code,
pc_t pc,
int *const len )
private

Definition at line 17 of file wasm-interpreter-simd.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoEncodeInstruction()

RegMode v8::internal::wasm::WasmBytecodeGenerator::DoEncodeInstruction ( const WasmInstruction & instr,
RegMode curr_reg_mode,
RegMode next_reg_mode )
private

Definition at line 9349 of file wasm-interpreter.cc.

Here is the caller graph for this function:

◆ DoEncodeSuperInstruction()

bool v8::internal::wasm::WasmBytecodeGenerator::DoEncodeSuperInstruction ( RegMode & reg_mode,
const WasmInstruction & curr_instr,
const WasmInstruction & next_instr )
private

Definition at line 12767 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Emit()

void v8::internal::wasm::WasmBytecodeGenerator::Emit ( const void * buff,
size_t len )
inlineprivate

Definition at line 1563 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ EmitBranchOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitBranchOffset ( uint32_t delta)
inlineprivate

Definition at line 532 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ EmitBranchTableOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitBranchTableOffset ( uint32_t delta,
uint32_t code_pos )
inlineprivate

Definition at line 542 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ EmitCopySlot()

void v8::internal::wasm::WasmBytecodeGenerator::EmitCopySlot ( ValueType value_type,
uint32_t from_slot_index,
uint32_t to_slot_index,
bool copy_from_reg = false )
private

Definition at line 7519 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitF32Const()

void v8::internal::wasm::WasmBytecodeGenerator::EmitF32Const ( float value)
inlineprivate

Definition at line 1619 of file wasm-interpreter.h.

Here is the call graph for this function:

◆ EmitF64Const()

void v8::internal::wasm::WasmBytecodeGenerator::EmitF64Const ( double value)
inlineprivate

Definition at line 1620 of file wasm-interpreter.h.

Here is the call graph for this function:

◆ EmitFnId()

void v8::internal::wasm::WasmBytecodeGenerator::EmitFnId ( InstructionHandler func_id,
uint32_t pc = UINT_MAX )
inlineprivate

Definition at line 1670 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitGlobalIndex()

void v8::internal::wasm::WasmBytecodeGenerator::EmitGlobalIndex ( uint32_t index)
inlineprivate

Definition at line 508 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ EmitI16Const()

void v8::internal::wasm::WasmBytecodeGenerator::EmitI16Const ( int16_t value)
inlineprivate

Definition at line 1617 of file wasm-interpreter.h.

Here is the call graph for this function:

◆ EmitI32Const()

void v8::internal::wasm::WasmBytecodeGenerator::EmitI32Const ( int32_t value)
inlineprivate

Definition at line 1618 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitIfElseBranchOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitIfElseBranchOffset ( )
inlineprivate

Definition at line 551 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ EmitMemoryOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitMemoryOffset ( uint64_t value)
inlineprivate

Definition at line 1642 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitRefStackIndex()

void v8::internal::wasm::WasmBytecodeGenerator::EmitRefStackIndex ( int32_t value)
inlineprivate

Definition at line 1664 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitRefValueType()

void v8::internal::wasm::WasmBytecodeGenerator::EmitRefValueType ( int32_t value)
inlineprivate

Definition at line 1665 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitSlotOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitSlotOffset ( uint32_t value)
inlineprivate

Definition at line 1622 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitStackIndex()

void v8::internal::wasm::WasmBytecodeGenerator::EmitStackIndex ( int32_t value)
inlineprivate

Definition at line 1663 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitStructFieldOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitStructFieldOffset ( int32_t value)
inlineprivate

Definition at line 1666 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitTryCatchBranchOffset()

void v8::internal::wasm::WasmBytecodeGenerator::EmitTryCatchBranchOffset ( )
inlineprivate

Definition at line 562 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ EncodeInstruction()

RegMode v8::internal::wasm::WasmBytecodeGenerator::EncodeInstruction ( const WasmInstruction & instr,
RegMode curr_reg_mode,
RegMode next_reg_mode )
private

Definition at line 9320 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncodeSuperInstruction()

bool v8::internal::wasm::WasmBytecodeGenerator::EncodeSuperInstruction ( RegMode & reg_mode,
const WasmInstruction & curr_instr,
const WasmInstruction & next_instr )
private

Definition at line 12739 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndBlock()

int32_t v8::internal::wasm::WasmBytecodeGenerator::EndBlock ( WasmOpcode opcode)
private

Definition at line 7929 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ F32Pop()

void v8::internal::wasm::WasmBytecodeGenerator::F32Pop ( bool emit = true)
inlineprivate

Definition at line 1581 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ F32Push()

void v8::internal::wasm::WasmBytecodeGenerator::F32Push ( bool emit = true)
inlineprivate

Definition at line 373 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ F64Pop()

void v8::internal::wasm::WasmBytecodeGenerator::F64Pop ( bool emit = true)
inlineprivate

Definition at line 1582 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ F64Push()

void v8::internal::wasm::WasmBytecodeGenerator::F64Push ( bool emit = true)
inlineprivate

Definition at line 379 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ FindSharedSlot()

bool v8::internal::wasm::WasmBytecodeGenerator::FindSharedSlot ( uint32_t stack_index,
uint32_t * new_slot_index )
private

Definition at line 7464 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ function_index()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::function_index ( ) const
inlineprivate

Definition at line 1752 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GenerateBytecode()

std::unique_ptr< WasmBytecode > v8::internal::wasm::WasmBytecodeGenerator::GenerateBytecode ( )

Definition at line 12961 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConstSlot()

template<typename T >
uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetConstSlot ( T value)
inlineprivate

Definition at line 1798 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentBranchDepth()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetCurrentBranchDepth ( ) const
inlineprivate

Definition at line 512 of file wasm-interpreter-inl.h.

◆ GetCurrentTryBlockIndex()

int v8::internal::wasm::WasmBytecodeGenerator::GetCurrentTryBlockIndex ( bool return_matching_try_for_catch_blocks) const
private

Definition at line 13095 of file wasm-interpreter.cc.

Here is the caller graph for this function:

◆ GetF32ConstSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetF32ConstSlot ( float value)
inlineprivate

Definition at line 1830 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetF64ConstSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetF64ConstSlot ( double value)
inlineprivate

Definition at line 1837 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetFunctionSignature()

const FunctionSig * v8::internal::wasm::WasmBytecodeGenerator::GetFunctionSignature ( uint32_t function_index) const
inlineprivate

Definition at line 586 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ GetGlobalType()

ValueKind v8::internal::wasm::WasmBytecodeGenerator::GetGlobalType ( uint32_t index) const
inlineprivate

Definition at line 496 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ GetI32ConstSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetI32ConstSlot ( int32_t value)
inlineprivate

Definition at line 1816 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetI64ConstSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetI64ConstSlot ( int64_t value)
inlineprivate

Definition at line 1823 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetParamType()

ValueType v8::internal::wasm::WasmBytecodeGenerator::GetParamType ( const WasmBytecodeGenerator::BlockData & block_data,
size_t index ) const
inlineprivate

Definition at line 465 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReturnType()

ValueType v8::internal::wasm::WasmBytecodeGenerator::GetReturnType ( const WasmBytecodeGenerator::BlockData & block_data,
size_t index ) const
inlineprivate

Definition at line 484 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetS128ConstSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetS128ConstSlot ( Simd128 value)
inlineprivate

Definition at line 1844 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetStackFrameSize()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::GetStackFrameSize ( ) const
inlineprivate

Definition at line 1528 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetTargetBranch()

int32_t v8::internal::wasm::WasmBytecodeGenerator::GetTargetBranch ( uint32_t delta) const
inlineprivate

Definition at line 523 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ GetTopStackType()

ValueKind v8::internal::wasm::WasmBytecodeGenerator::GetTopStackType ( RegMode reg_mode) const
inlineprivate

Definition at line 591 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasSharedSlot()

bool v8::internal::wasm::WasmBytecodeGenerator::HasSharedSlot ( uint32_t stack_index) const
private

Definition at line 7444 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasVoidSignature()

bool v8::internal::wasm::WasmBytecodeGenerator::HasVoidSignature ( const WasmBytecodeGenerator::BlockData & block_data) const
inlineprivate

Definition at line 443 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ I32Pop()

void v8::internal::wasm::WasmBytecodeGenerator::I32Pop ( bool emit = true)
inlineprivate

Definition at line 1578 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ I32Push()

void v8::internal::wasm::WasmBytecodeGenerator::I32Push ( bool emit = true)
inlineprivate

Definition at line 361 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ I64Pop()

void v8::internal::wasm::WasmBytecodeGenerator::I64Pop ( bool emit = true)
inlineprivate

Definition at line 1579 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ I64Push()

void v8::internal::wasm::WasmBytecodeGenerator::I64Push ( bool emit = true)
inlineprivate

Definition at line 367 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ InitSlotsForFunctionArgs()

void v8::internal::wasm::WasmBytecodeGenerator::InitSlotsForFunctionArgs ( const FunctionSig * sig,
bool is_indirect_call )
private

Definition at line 8699 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsMemory64()

bool v8::internal::wasm::WasmBytecodeGenerator::IsMemory64 ( ) const
inlineprivate

Definition at line 500 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ IsMultiMemory()

bool v8::internal::wasm::WasmBytecodeGenerator::IsMultiMemory ( ) const
inlineprivate

Definition at line 504 of file wasm-interpreter-inl.h.

◆ ITableIndexPush()

void v8::internal::wasm::WasmBytecodeGenerator::ITableIndexPush ( bool is_table64,
bool emit = true )
inlineprivate

◆ MemIndexPop()

void v8::internal::wasm::WasmBytecodeGenerator::MemIndexPop ( bool emit = true)
inlineprivate

Definition at line 1580 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ MemIndexPush()

void v8::internal::wasm::WasmBytecodeGenerator::MemIndexPush ( bool emit = true)
inlineprivate

Definition at line 1570 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ operator=()

WasmBytecodeGenerator & v8::internal::wasm::WasmBytecodeGenerator::operator= ( const WasmBytecodeGenerator & )
privatedelete

◆ ParamsCount()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::ParamsCount ( const WasmBytecodeGenerator::BlockData & block_data) const
inlineprivate

Definition at line 455 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PatchBranchOffsets()

void v8::internal::wasm::WasmBytecodeGenerator::PatchBranchOffsets ( )
private

Definition at line 13121 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PatchLoopBeginInstructions()

void v8::internal::wasm::WasmBytecodeGenerator::PatchLoopBeginInstructions ( )
private

Definition at line 13111 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Pop()

void v8::internal::wasm::WasmBytecodeGenerator::Pop ( ValueKind kind,
bool emit = true )
inlineprivate

Definition at line 1607 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopSlot()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::PopSlot ( )
inlineprivate

Definition at line 1905 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PreserveArgsAndLocals()

void v8::internal::wasm::WasmBytecodeGenerator::PreserveArgsAndLocals ( )
private

Definition at line 7725 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintBytecodeCompressionStats()

void v8::internal::wasm::WasmBytecodeGenerator::PrintBytecodeCompressionStats ( )
static

Definition at line 8686 of file wasm-interpreter.cc.

Here is the caller graph for this function:

◆ Push()

void v8::internal::wasm::WasmBytecodeGenerator::Push ( ValueType type)
inlineprivate

Definition at line 400 of file wasm-interpreter-inl.h.

Here is the call graph for this function:

◆ PushConstSlot() [1/2]

template<typename T >
uint32_t v8::internal::wasm::WasmBytecodeGenerator::PushConstSlot ( T value)
inlineprivate

Definition at line 1874 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushConstSlot() [2/2]

void v8::internal::wasm::WasmBytecodeGenerator::PushConstSlot ( uint32_t slot_index)
inlineprivate

Definition at line 435 of file wasm-interpreter-inl.h.

◆ PushCopySlot()

void v8::internal::wasm::WasmBytecodeGenerator::PushCopySlot ( uint32_t from_stack_index)
inlineprivate

Definition at line 426 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ PushSlot()

void v8::internal::wasm::WasmBytecodeGenerator::PushSlot ( uint32_t slot_index)
inlineprivate

Definition at line 1884 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefPop()

ValueType v8::internal::wasm::WasmBytecodeGenerator::RefPop ( bool emit = true)
inlineprivate

Definition at line 1585 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefPush()

void v8::internal::wasm::WasmBytecodeGenerator::RefPush ( ValueType type,
bool emit = true )
inlineprivate

Definition at line 391 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ ReserveBlockSlots()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::ReserveBlockSlots ( uint8_t opcode,
const WasmInstruction::Optional::Block & block_data,
size_t * rets_slots_count,
size_t * params_slots_count )
private

Definition at line 7741 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RestoreIfElseParams()

void v8::internal::wasm::WasmBytecodeGenerator::RestoreIfElseParams ( uint32_t if_block_index)
private

Definition at line 7881 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ Return()

void v8::internal::wasm::WasmBytecodeGenerator::Return ( )
private

Definition at line 7959 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReturnsCount()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::ReturnsCount ( const WasmBytecodeGenerator::BlockData & block_data) const
inlineprivate

Definition at line 472 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ S128Pop()

void v8::internal::wasm::WasmBytecodeGenerator::S128Pop ( bool emit = true)
inlineprivate

Definition at line 1583 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ S128Push()

void v8::internal::wasm::WasmBytecodeGenerator::S128Push ( bool emit = true)
inlineprivate

Definition at line 385 of file wasm-interpreter-inl.h.

Here is the caller graph for this function:

◆ ScanConstInstructions()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::ScanConstInstructions ( ) const
private

Definition at line 7904 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSlotType()

void v8::internal::wasm::WasmBytecodeGenerator::SetSlotType ( uint32_t stack_index,
ValueType type )
inlineprivate

Definition at line 1928 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetUnreachableMode()

void v8::internal::wasm::WasmBytecodeGenerator::SetUnreachableMode ( )
inlineprivate

Definition at line 1962 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ stack_size()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::stack_size ( ) const
inlineprivate

Definition at line 1958 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_top_index()

uint32_t v8::internal::wasm::WasmBytecodeGenerator::stack_top_index ( ) const
inlineprivate

Definition at line 1954 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StoreBlockParamsAndResultsIntoSlots()

void v8::internal::wasm::WasmBytecodeGenerator::StoreBlockParamsAndResultsIntoSlots ( uint32_t target_block_index,
WasmOpcode opcode )
private

Definition at line 7814 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StoreBlockParamsIntoSlots()

void v8::internal::wasm::WasmBytecodeGenerator::StoreBlockParamsIntoSlots ( uint32_t target_block_index,
bool update_stack )
private

Definition at line 7774 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToRegisterIsAllowed()

bool v8::internal::wasm::WasmBytecodeGenerator::ToRegisterIsAllowed ( const WasmInstruction & instr)
inlineprivate

Definition at line 339 of file wasm-interpreter-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryCompactInstructionHandler()

bool v8::internal::wasm::WasmBytecodeGenerator::TryCompactInstructionHandler ( InstructionHandler func_addr)
private

Definition at line 13154 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeCheckAlwaysFails()

bool v8::internal::wasm::WasmBytecodeGenerator::TypeCheckAlwaysFails ( ValueType obj_type,
HeapType expected_type,
bool null_succeeds ) const
private

Definition at line 8791 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeCheckAlwaysSucceeds()

bool v8::internal::wasm::WasmBytecodeGenerator::TypeCheckAlwaysSucceeds ( ValueType obj_type,
HeapType type ) const
private

Definition at line 8783 of file wasm-interpreter.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateStack() [1/2]

void v8::internal::wasm::WasmBytecodeGenerator::UpdateStack ( uint32_t index,
uint32_t slot_index )
inlineprivate

Definition at line 1943 of file wasm-interpreter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateStack() [2/2]

void v8::internal::wasm::WasmBytecodeGenerator::UpdateStack ( uint32_t index,
uint32_t slot_index,
ValueType value_type )
inlineprivate

Definition at line 1947 of file wasm-interpreter.h.

Here is the call graph for this function:

Member Data Documentation

◆ args_count_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::args_count_
private

Definition at line 2054 of file wasm-interpreter.h.

◆ args_slots_size_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::args_slots_size_
private

Definition at line 2055 of file wasm-interpreter.h.

◆ blocks_

std::vector<BlockData> v8::internal::wasm::WasmBytecodeGenerator::blocks_
private

Definition at line 2062 of file wasm-interpreter.h.

◆ br_table_labels_

base::SmallVector<uint32_t, 8> v8::internal::wasm::WasmBytecodeGenerator::br_table_labels_
private

Definition at line 2071 of file wasm-interpreter.h.

◆ code_

std::vector<uint8_t> v8::internal::wasm::WasmBytecodeGenerator::code_
private

Definition at line 2060 of file wasm-interpreter.h.

◆ code_pc_map_

std::map<CodeOffset, pc_t> v8::internal::wasm::WasmBytecodeGenerator::code_pc_map_
private

Definition at line 2084 of file wasm-interpreter.h.

◆ const_slot_offset_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::const_slot_offset_
private

Definition at line 1989 of file wasm-interpreter.h.

◆ const_slots_values_

std::vector<uint8_t> v8::internal::wasm::WasmBytecodeGenerator::const_slots_values_
private

Definition at line 1988 of file wasm-interpreter.h.

◆ current_block_index_

int32_t v8::internal::wasm::WasmBytecodeGenerator::current_block_index_
private

Definition at line 2063 of file wasm-interpreter.h.

◆ current_instr_encoding_failed_

bool v8::internal::wasm::WasmBytecodeGenerator::current_instr_encoding_failed_
private

Definition at line 2093 of file wasm-interpreter.h.

◆ eh_data_

WasmEHDataGenerator v8::internal::wasm::WasmBytecodeGenerator::eh_data_
private

Definition at line 2089 of file wasm-interpreter.h.

◆ emitted_short_memory_offset_count_

std::atomic< size_t > v8::internal::wasm::WasmBytecodeGenerator::emitted_short_memory_offset_count_
staticprivate
Initial value:
=
0

Definition at line 2097 of file wasm-interpreter.h.

◆ emitted_short_slot_offset_count_

std::atomic< size_t > v8::internal::wasm::WasmBytecodeGenerator::emitted_short_slot_offset_count_ = 0
staticprivate

Definition at line 2096 of file wasm-interpreter.h.

◆ f32_const_cache_

std::unordered_map<float, uint32_t> v8::internal::wasm::WasmBytecodeGenerator::f32_const_cache_
private

Definition at line 1992 of file wasm-interpreter.h.

◆ f64_const_cache_

std::unordered_map<double, uint32_t> v8::internal::wasm::WasmBytecodeGenerator::f64_const_cache_
private

Definition at line 1993 of file wasm-interpreter.h.

◆ function_index_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::function_index_
private

Definition at line 2052 of file wasm-interpreter.h.

◆ handler_size_

InstrHandlerSize v8::internal::wasm::WasmBytecodeGenerator::handler_size_
private

Definition at line 2092 of file wasm-interpreter.h.

◆ i32_const_cache_

std::unordered_map<int32_t, uint32_t> v8::internal::wasm::WasmBytecodeGenerator::i32_const_cache_
private

Definition at line 1990 of file wasm-interpreter.h.

◆ i64_const_cache_

std::unordered_map<int64_t, uint32_t> v8::internal::wasm::WasmBytecodeGenerator::i64_const_cache_
private

Definition at line 1991 of file wasm-interpreter.h.

◆ int_mem_pop_

MemIndexPopFunc v8::internal::wasm::WasmBytecodeGenerator::int_mem_pop_
private

Definition at line 1985 of file wasm-interpreter.h.

◆ int_mem_push_

MemIndexPushFunc v8::internal::wasm::WasmBytecodeGenerator::int_mem_push_
private

Definition at line 1984 of file wasm-interpreter.h.

◆ is_instruction_reachable_

bool v8::internal::wasm::WasmBytecodeGenerator::is_instruction_reachable_
private

Definition at line 2065 of file wasm-interpreter.h.

◆ is_memory64_

bool v8::internal::wasm::WasmBytecodeGenerator::is_memory64_
private

Definition at line 1986 of file wasm-interpreter.h.

◆ kInvalidCodeOffset

const CodeOffset v8::internal::wasm::WasmBytecodeGenerator::kInvalidCodeOffset = (CodeOffset)-1
staticprivate

Definition at line 2086 of file wasm-interpreter.h.

◆ last_instr_offset_

CodeOffset v8::internal::wasm::WasmBytecodeGenerator::last_instr_offset_
private

Definition at line 2087 of file wasm-interpreter.h.

◆ locals_count_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::locals_count_
private

Definition at line 2058 of file wasm-interpreter.h.

◆ loop_begin_code_offsets_

base::SmallVector<uint32_t, 16> v8::internal::wasm::WasmBytecodeGenerator::loop_begin_code_offsets_
private

Definition at line 2072 of file wasm-interpreter.h.

◆ module_

const WasmModule* v8::internal::wasm::WasmBytecodeGenerator::module_
private

Definition at line 2074 of file wasm-interpreter.h.

◆ no_nested_emit_instr_handler_guard_

bool v8::internal::wasm::WasmBytecodeGenerator::no_nested_emit_instr_handler_guard_
private

Definition at line 2094 of file wasm-interpreter.h.

◆ ref_slots_count_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::ref_slots_count_
private

Definition at line 2050 of file wasm-interpreter.h.

◆ rets_slots_size_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::rets_slots_size_
private

Definition at line 2057 of file wasm-interpreter.h.

◆ return_count_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::return_count_
private

Definition at line 2056 of file wasm-interpreter.h.

◆ s128_const_cache_

std::unordered_map<Simd128, uint32_t, Simd128Hash> v8::internal::wasm::WasmBytecodeGenerator::s128_const_cache_
private

Definition at line 1998 of file wasm-interpreter.h.

◆ simd_immediates_

std::vector<Simd128> v8::internal::wasm::WasmBytecodeGenerator::simd_immediates_
private

Definition at line 2000 of file wasm-interpreter.h.

◆ slot_offset_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::slot_offset_
private

Definition at line 2001 of file wasm-interpreter.h.

◆ slots_

std::vector<Slot> v8::internal::wasm::WasmBytecodeGenerator::slots_
private

Definition at line 1754 of file wasm-interpreter.h.

◆ stack_

RollbackStack v8::internal::wasm::WasmBytecodeGenerator::stack_
private

Definition at line 2048 of file wasm-interpreter.h.

◆ total_bytecode_size_

std::atomic< size_t > v8::internal::wasm::WasmBytecodeGenerator::total_bytecode_size_ = 0
staticprivate

Definition at line 2095 of file wasm-interpreter.h.

◆ unreachable_block_count_

uint32_t v8::internal::wasm::WasmBytecodeGenerator::unreachable_block_count_
private

Definition at line 2066 of file wasm-interpreter.h.

◆ wasm_code_

InterpreterCode* v8::internal::wasm::WasmBytecodeGenerator::wasm_code_
private

Definition at line 2053 of file wasm-interpreter.h.


The documentation for this class was generated from the following files: