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

#include <jump-table-assembler.h>

Collaboration diagram for v8::internal::wasm::JumpTableAssembler:

Public Member Functions

template<typename T >
void emit (T value)
 
template<typename T >
void emit (T value, RelaxedStoreTag) DISABLE_UBSAN
 

Static Public Member Functions

static uint32_t SlotOffsetToIndex (uint32_t slot_offset)
 
static uint32_t JumpSlotIndexToOffset (uint32_t slot_index)
 
static constexpr uint32_t SizeForNumberOfSlots (uint32_t slot_count)
 
static uint32_t FarJumpSlotIndexToOffset (uint32_t slot_index)
 
static uint32_t FarJumpSlotOffsetToIndex (uint32_t offset)
 
static constexpr uint32_t SizeForNumberOfFarJumpSlots (int num_runtime_slots, int num_function_slots)
 
static uint32_t LazyCompileSlotIndexToOffset (uint32_t slot_index)
 
static constexpr uint32_t SizeForNumberOfLazyFunctions (uint32_t slot_count)
 
static void GenerateLazyCompileTable (Address base, uint32_t num_slots, uint32_t num_imported_functions, Address wasm_compile_lazy_target)
 
static void InitializeJumpsToLazyCompileTable (Address base, uint32_t num_slots, Address lazy_compile_table_start)
 
static void GenerateFarJumpTable (WritableJitAllocation &jit_allocation, Address base, Address *stub_targets, int num_runtime_slots, int num_function_slots)
 
static void PatchJumpTableSlot (WritableJumpTablePair &jump_table_pair, Address jump_table_slot, Address far_jump_table_slot, Address target)
 

Private Member Functions

 JumpTableAssembler (WritableJitAllocation &jit_allocation, Address slot_addr)
 
void EmitLazyCompileJumpSlot (uint32_t func_index, Address lazy_compile_target)
 
bool EmitJumpSlot (Address target)
 
void EmitFarJumpSlot (Address target)
 
void SkipUntil (int offset)
 
int pc_offset () const
 
template<typename V >
void emit (V value)
 
template<typename V >
void emit (V value, RelaxedStoreTag)
 

Static Private Member Functions

static void PatchFarJumpSlot (WritableJitAllocation &jit_allocation, Address slot, Address target)
 

Private Attributes

WritableJitAllocationjit_allocation_
 
const Address buffer_start_
 
Address pc_
 

Static Private Attributes

static constexpr int kJumpTableSlotsPerLine
 

Detailed Description

Definition at line 60 of file jump-table-assembler.h.

Constructor & Destructor Documentation

◆ JumpTableAssembler()

v8::internal::wasm::JumpTableAssembler::JumpTableAssembler ( WritableJitAllocation & jit_allocation,
Address slot_addr )
inlineexplicitprivate

Definition at line 169 of file jump-table-assembler.h.

Member Function Documentation

◆ emit() [1/4]

template<typename T >
void v8::internal::wasm::JumpTableAssembler::emit ( T value)

Definition at line 73 of file jump-table-assembler.cc.

Here is the call graph for this function:

◆ emit() [2/4]

template<typename T >
void v8::internal::wasm::JumpTableAssembler::emit ( T value,
RelaxedStoreTag  )

Definition at line 79 of file jump-table-assembler.cc.

◆ emit() [3/4]

template<typename V >
void v8::internal::wasm::JumpTableAssembler::emit ( V value)
private

◆ emit() [4/4]

template<typename V >
void v8::internal::wasm::JumpTableAssembler::emit ( V value,
RelaxedStoreTag  )
private

◆ EmitFarJumpSlot()

void v8::internal::wasm::JumpTableAssembler::EmitFarJumpSlot ( Address target)
private
Here is the caller graph for this function:

◆ EmitJumpSlot()

bool v8::internal::wasm::JumpTableAssembler::EmitJumpSlot ( Address target)
private
Here is the caller graph for this function:

◆ EmitLazyCompileJumpSlot()

void v8::internal::wasm::JumpTableAssembler::EmitLazyCompileJumpSlot ( uint32_t func_index,
Address lazy_compile_target )
private
Here is the caller graph for this function:

◆ FarJumpSlotIndexToOffset()

static uint32_t v8::internal::wasm::JumpTableAssembler::FarJumpSlotIndexToOffset ( uint32_t slot_index)
inlinestatic

Definition at line 87 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ FarJumpSlotOffsetToIndex()

static uint32_t v8::internal::wasm::JumpTableAssembler::FarJumpSlotOffsetToIndex ( uint32_t offset)
inlinestatic

Definition at line 92 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ GenerateFarJumpTable()

static void v8::internal::wasm::JumpTableAssembler::GenerateFarJumpTable ( WritableJitAllocation & jit_allocation,
Address base,
Address * stub_targets,
int num_runtime_slots,
int num_function_slots )
inlinestatic

Definition at line 124 of file jump-table-assembler.h.

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

◆ GenerateLazyCompileTable()

void v8::internal::wasm::JumpTableAssembler::GenerateLazyCompileTable ( Address base,
uint32_t num_slots,
uint32_t num_imported_functions,
Address wasm_compile_lazy_target )
static

Definition at line 15 of file jump-table-assembler.cc.

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

◆ InitializeJumpsToLazyCompileTable()

void v8::internal::wasm::JumpTableAssembler::InitializeJumpsToLazyCompileTable ( Address base,
uint32_t num_slots,
Address lazy_compile_table_start )
static

Definition at line 33 of file jump-table-assembler.cc.

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

◆ JumpSlotIndexToOffset()

static uint32_t v8::internal::wasm::JumpTableAssembler::JumpSlotIndexToOffset ( uint32_t slot_index)
inlinestatic

Definition at line 72 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ LazyCompileSlotIndexToOffset()

static uint32_t v8::internal::wasm::JumpTableAssembler::LazyCompileSlotIndexToOffset ( uint32_t slot_index)
inlinestatic

Definition at line 106 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ PatchFarJumpSlot()

static void v8::internal::wasm::JumpTableAssembler::PatchFarJumpSlot ( WritableJitAllocation & jit_allocation,
Address slot,
Address target )
staticprivate

◆ PatchJumpTableSlot()

static void v8::internal::wasm::JumpTableAssembler::PatchJumpTableSlot ( WritableJumpTablePair & jump_table_pair,
Address jump_table_slot,
Address far_jump_table_slot,
Address target )
inlinestatic

Definition at line 147 of file jump-table-assembler.h.

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

◆ pc_offset()

int v8::internal::wasm::JumpTableAssembler::pc_offset ( ) const
inlineprivate

Definition at line 272 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ SizeForNumberOfFarJumpSlots()

static constexpr uint32_t v8::internal::wasm::JumpTableAssembler::SizeForNumberOfFarJumpSlots ( int num_runtime_slots,
int num_function_slots )
inlinestaticconstexpr

Definition at line 99 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ SizeForNumberOfLazyFunctions()

static constexpr uint32_t v8::internal::wasm::JumpTableAssembler::SizeForNumberOfLazyFunctions ( uint32_t slot_count)
inlinestaticconstexpr

Definition at line 111 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ SizeForNumberOfSlots()

static constexpr uint32_t v8::internal::wasm::JumpTableAssembler::SizeForNumberOfSlots ( uint32_t slot_count)
inlinestaticconstexpr

Definition at line 80 of file jump-table-assembler.h.

Here is the caller graph for this function:

◆ SkipUntil()

void v8::internal::wasm::JumpTableAssembler::SkipUntil ( int offset)
private
Here is the caller graph for this function:

◆ SlotOffsetToIndex()

static uint32_t v8::internal::wasm::JumpTableAssembler::SlotOffsetToIndex ( uint32_t slot_offset)
inlinestatic

Definition at line 63 of file jump-table-assembler.h.

Here is the caller graph for this function:

Member Data Documentation

◆ buffer_start_

const Address v8::internal::wasm::JumpTableAssembler::buffer_start_
private

Definition at line 176 of file jump-table-assembler.h.

◆ jit_allocation_

WritableJitAllocation& v8::internal::wasm::JumpTableAssembler::jit_allocation_
private

Definition at line 175 of file jump-table-assembler.h.

◆ kJumpTableSlotsPerLine

int v8::internal::wasm::JumpTableAssembler::kJumpTableSlotsPerLine
staticconstexprprivate
Initial value:
=
kJumpTableLineSize / kJumpTableSlotSize

Definition at line 252 of file jump-table-assembler.h.

◆ pc_

Address v8::internal::wasm::JumpTableAssembler::pc_
private

Definition at line 177 of file jump-table-assembler.h.


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