pub struct FuncEnvironment<'module_environment> {Show 28 fields
target_config: TargetFrontendConfig,
module: &'module_environment ModuleInfo,
type_stack: Vec<Type>,
signatures: &'module_environment PrimaryMap<SignatureIndex, Signature>,
heaps: PrimaryMap<Heap, HeapData>,
vmctx: Option<GlobalValue>,
memory32_size_sig: Option<SigRef>,
table_size_sig: Option<SigRef>,
memory_grow_sig: Option<SigRef>,
table_grow_sig: Option<SigRef>,
table_copy_sig: Option<SigRef>,
table_init_sig: Option<SigRef>,
elem_drop_sig: Option<SigRef>,
memory_copy_sig: Option<SigRef>,
memory_fill_sig: Option<SigRef>,
memory_init_sig: Option<SigRef>,
data_drop_sig: Option<SigRef>,
table_get_sig: Option<SigRef>,
table_set_sig: Option<SigRef>,
func_ref_sig: Option<SigRef>,
table_fill_sig: Option<SigRef>,
memory32_atomic_wait32_sig: Option<SigRef>,
memory32_atomic_wait64_sig: Option<SigRef>,
memory32_atomic_notify_sig: Option<SigRef>,
offsets: VMOffsets,
memory_styles: &'module_environment PrimaryMap<MemoryIndex, MemoryStyle>,
tables: SecondaryMap<TableIndex, Option<TableData>>,
table_styles: &'module_environment PrimaryMap<TableIndex, TableStyle>,
}
Expand description
The FuncEnvironment
implementation for use by the ModuleEnvironment
.
Fields§
§target_config: TargetFrontendConfig
Target-specified configuration.
module: &'module_environment ModuleInfo
The module-level environment which this function-level environment belongs to.
type_stack: Vec<Type>
A stack tracking the type of local variables.
signatures: &'module_environment PrimaryMap<SignatureIndex, Signature>
The module function signatures
heaps: PrimaryMap<Heap, HeapData>
Heaps implementing WebAssembly linear memories.
vmctx: Option<GlobalValue>
The Cranelift global holding the vmctx address.
memory32_size_sig: Option<SigRef>
The external function signature for implementing wasm’s memory.size
for locally-defined 32-bit memories.
table_size_sig: Option<SigRef>
The external function signature for implementing wasm’s table.size
for locally-defined tables.
memory_grow_sig: Option<SigRef>
The external function signature for implementing wasm’s memory.grow
for locally-defined memories.
table_grow_sig: Option<SigRef>
The external function signature for implementing wasm’s table.grow
for locally-defined tables.
table_copy_sig: Option<SigRef>
The external function signature for implementing wasm’s table.copy
(it’s the same for both local and imported tables).
table_init_sig: Option<SigRef>
The external function signature for implementing wasm’s table.init
.
elem_drop_sig: Option<SigRef>
The external function signature for implementing wasm’s elem.drop
.
memory_copy_sig: Option<SigRef>
The external function signature for implementing wasm’s memory.copy
(it’s the same for both local and imported memories).
memory_fill_sig: Option<SigRef>
The external function signature for implementing wasm’s memory.fill
(it’s the same for both local and imported memories).
memory_init_sig: Option<SigRef>
The external function signature for implementing wasm’s memory.init
.
data_drop_sig: Option<SigRef>
The external function signature for implementing wasm’s data.drop
.
table_get_sig: Option<SigRef>
The external function signature for implementing wasm’s table.get
.
table_set_sig: Option<SigRef>
The external function signature for implementing wasm’s table.set
.
func_ref_sig: Option<SigRef>
The external function signature for implementing wasm’s func.ref
.
table_fill_sig: Option<SigRef>
The external function signature for implementing wasm’s table.fill
.
memory32_atomic_wait32_sig: Option<SigRef>
The external function signature for implementing wasm’s memory32.atomic.wait32
.
memory32_atomic_wait64_sig: Option<SigRef>
The external function signature for implementing wasm’s memory32.atomic.wait64
.
memory32_atomic_notify_sig: Option<SigRef>
The external function signature for implementing wasm’s memory32.atomic.notify
.
offsets: VMOffsets
Offsets to struct fields accessed by JIT code.
memory_styles: &'module_environment PrimaryMap<MemoryIndex, MemoryStyle>
The memory styles
tables: SecondaryMap<TableIndex, Option<TableData>>
Cranelift tables we have created to implement Wasm tables.
table_styles: &'module_environment PrimaryMap<TableIndex, TableStyle>
Implementations§
source§impl<'module_environment> FuncEnvironment<'module_environment>
impl<'module_environment> FuncEnvironment<'module_environment>
pub fn new( target_config: TargetFrontendConfig, module: &'module_environment ModuleInfo, signatures: &'module_environment PrimaryMap<SignatureIndex, Signature>, memory_styles: &'module_environment PrimaryMap<MemoryIndex, MemoryStyle>, table_styles: &'module_environment PrimaryMap<TableIndex, TableStyle>, ) -> Self
fn pointer_type(&self) -> Type
fn ensure_table_exists(&mut self, func: &mut Function, index: TableIndex)
fn vmctx(&mut self, func: &mut Function) -> GlobalValue
fn get_table_fill_sig(&mut self, func: &mut Function) -> SigRef
fn get_table_fill_func( &mut self, func: &mut Function, table_index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_func_ref_sig(&mut self, func: &mut Function) -> SigRef
fn get_func_ref_func( &mut self, func: &mut Function, function_index: FunctionIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_table_get_sig(&mut self, func: &mut Function) -> SigRef
fn get_table_get_func( &mut self, func: &mut Function, table_index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_table_set_sig(&mut self, func: &mut Function) -> SigRef
fn get_table_set_func( &mut self, func: &mut Function, table_index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_table_grow_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_table_grow_func(
&mut self,
func: &mut Function,
index: TableIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_table_grow_func( &mut self, func: &mut Function, index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the table.grow function signature to call for the given index, along with the
translated index value to pass to it and its index in VMBuiltinFunctionsArray
.
fn get_memory_grow_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_memory_grow_func(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_grow_func( &mut self, func: &mut Function, index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.grow function signature to call for the given index, along with the
translated index value to pass to it and its index in VMBuiltinFunctionsArray
.
fn get_table_size_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_table_size_func(
&mut self,
func: &mut Function,
index: TableIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_table_size_func( &mut self, func: &mut Function, index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.size function signature to call for the given index, along with the
translated index value to pass to it and its index in VMBuiltinFunctionsArray
.
fn get_memory32_size_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_memory_size_func(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_size_func( &mut self, func: &mut Function, index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.size function signature to call for the given index, along with the
translated index value to pass to it and its index in VMBuiltinFunctionsArray
.
fn get_table_copy_sig(&mut self, func: &mut Function) -> SigRef
fn get_table_copy_func( &mut self, func: &mut Function, dst_table_index: TableIndex, src_table_index: TableIndex, ) -> (SigRef, usize, usize, VMBuiltinFunctionIndex)
fn get_table_init_sig(&mut self, func: &mut Function) -> SigRef
fn get_table_init_func( &mut self, func: &mut Function, table_index: TableIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_elem_drop_sig(&mut self, func: &mut Function) -> SigRef
fn get_elem_drop_func( &mut self, func: &mut Function, ) -> (SigRef, VMBuiltinFunctionIndex)
fn get_memory_copy_sig(&mut self, func: &mut Function) -> SigRef
fn get_memory_copy_func( &mut self, func: &mut Function, memory_index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_fill_sig(&mut self, func: &mut Function) -> SigRef
fn get_memory_fill_func( &mut self, func: &mut Function, memory_index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_init_sig(&mut self, func: &mut Function) -> SigRef
fn get_memory_init_func( &mut self, func: &mut Function, ) -> (SigRef, VMBuiltinFunctionIndex)
fn get_data_drop_sig(&mut self, func: &mut Function) -> SigRef
fn get_data_drop_func( &mut self, func: &mut Function, ) -> (SigRef, VMBuiltinFunctionIndex)
fn get_memory32_atomic_wait32_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_memory_atomic_wait32_func(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_atomic_wait32_func( &mut self, func: &mut Function, index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.atomic.wait32 function signature to call for the given index,
along with the translated index value to pass to it
and its index in VMBuiltinFunctionsArray
.
fn get_memory32_atomic_wait64_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_memory_atomic_wait64_func(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_atomic_wait64_func( &mut self, func: &mut Function, index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.atomic.wait64 function signature to call for the given index,
along with the translated index value to pass to it
and its index in VMBuiltinFunctionsArray
.
fn get_memory32_atomic_notify_sig(&mut self, func: &mut Function) -> SigRef
sourcefn get_memory_atomic_notify_func(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> (SigRef, usize, VMBuiltinFunctionIndex)
fn get_memory_atomic_notify_func( &mut self, func: &mut Function, index: MemoryIndex, ) -> (SigRef, usize, VMBuiltinFunctionIndex)
Return the memory.atomic.notify function signature to call for the given index,
along with the translated index value to pass to it
and its index in VMBuiltinFunctionsArray
.
sourcefn translate_load_builtin_function_address(
&mut self,
pos: &mut FuncCursor<'_>,
callee_func_idx: VMBuiltinFunctionIndex,
) -> (Value, Value)
fn translate_load_builtin_function_address( &mut self, pos: &mut FuncCursor<'_>, callee_func_idx: VMBuiltinFunctionIndex, ) -> (Value, Value)
Translates load of builtin function and returns a pair of values vmctx
and address of the loaded function.
fn get_or_init_funcref_table_elem( &mut self, builder: &mut FunctionBuilder<'_>, table_index: TableIndex, index: Value, ) -> Value
Trait Implementations§
source§impl<'module_environment> FuncEnvironment for FuncEnvironment<'module_environment>
impl<'module_environment> FuncEnvironment for FuncEnvironment<'module_environment>
source§fn is_wasm_parameter(&self, _signature: &Signature, index: usize) -> bool
fn is_wasm_parameter(&self, _signature: &Signature, index: usize) -> bool
source§fn translate_table_grow(
&mut self,
pos: FuncCursor<'_>,
table_index: TableIndex,
delta: Value,
init_value: Value,
) -> WasmResult<Value>
fn translate_table_grow( &mut self, pos: FuncCursor<'_>, table_index: TableIndex, delta: Value, init_value: Value, ) -> WasmResult<Value>
table.grow
WebAssembly instruction.source§fn translate_table_get(
&mut self,
builder: &mut FunctionBuilder<'_>,
table_index: TableIndex,
index: Value,
) -> WasmResult<Value>
fn translate_table_get( &mut self, builder: &mut FunctionBuilder<'_>, table_index: TableIndex, index: Value, ) -> WasmResult<Value>
table.get
WebAssembly instruction.source§fn translate_table_set(
&mut self,
builder: &mut FunctionBuilder<'_>,
table_index: TableIndex,
value: Value,
index: Value,
) -> WasmResult<()>
fn translate_table_set( &mut self, builder: &mut FunctionBuilder<'_>, table_index: TableIndex, value: Value, index: Value, ) -> WasmResult<()>
table.set
WebAssembly instruction.source§fn translate_table_fill(
&mut self,
pos: FuncCursor<'_>,
table_index: TableIndex,
dst: Value,
val: Value,
len: Value,
) -> WasmResult<()>
fn translate_table_fill( &mut self, pos: FuncCursor<'_>, table_index: TableIndex, dst: Value, val: Value, len: Value, ) -> WasmResult<()>
table.fill
WebAssembly instruction.source§fn translate_ref_null(
&mut self,
pos: FuncCursor<'_>,
ty: HeapType,
) -> WasmResult<Value>
fn translate_ref_null( &mut self, pos: FuncCursor<'_>, ty: HeapType, ) -> WasmResult<Value>
ref.null T
WebAssembly instruction. Read moresource§fn translate_ref_is_null(
&mut self,
pos: FuncCursor<'_>,
value: Value,
) -> WasmResult<Value>
fn translate_ref_is_null( &mut self, pos: FuncCursor<'_>, value: Value, ) -> WasmResult<Value>
ref.is_null
WebAssembly instruction. Read moresource§fn translate_ref_func(
&mut self,
pos: FuncCursor<'_>,
func_index: FunctionIndex,
) -> WasmResult<Value>
fn translate_ref_func( &mut self, pos: FuncCursor<'_>, func_index: FunctionIndex, ) -> WasmResult<Value>
ref.func
WebAssembly instruction.source§fn translate_custom_global_get(
&mut self,
_pos: FuncCursor<'_>,
_index: GlobalIndex,
) -> WasmResult<Value>
fn translate_custom_global_get( &mut self, _pos: FuncCursor<'_>, _index: GlobalIndex, ) -> WasmResult<Value>
global.get
WebAssembly instruction at pos
for a global
that is custom.source§fn translate_custom_global_set(
&mut self,
_pos: FuncCursor<'_>,
_index: GlobalIndex,
_value: Value,
) -> WasmResult<()>
fn translate_custom_global_set( &mut self, _pos: FuncCursor<'_>, _index: GlobalIndex, _value: Value, ) -> WasmResult<()>
global.set
WebAssembly instruction at pos
for a global
that is custom.source§fn make_heap(
&mut self,
func: &mut Function,
index: MemoryIndex,
) -> WasmResult<Heap>
fn make_heap( &mut self, func: &mut Function, index: MemoryIndex, ) -> WasmResult<Heap>
func
to access the linear memory identified
by index
. Read moresource§fn make_global(
&mut self,
func: &mut Function,
index: GlobalIndex,
) -> WasmResult<GlobalVariable>
fn make_global( &mut self, func: &mut Function, index: GlobalIndex, ) -> WasmResult<GlobalVariable>
func
to access the global variable
identified by index
. Read moresource§fn make_indirect_sig(
&mut self,
func: &mut Function,
index: SignatureIndex,
) -> WasmResult<SigRef>
fn make_indirect_sig( &mut self, func: &mut Function, index: SignatureIndex, ) -> WasmResult<SigRef>
func
that can be used for an indirect
call with signature index
. Read moresource§fn make_direct_func(
&mut self,
func: &mut Function,
index: FunctionIndex,
) -> WasmResult<FuncRef>
fn make_direct_func( &mut self, func: &mut Function, index: FunctionIndex, ) -> WasmResult<FuncRef>
func
that can be used to
directly call the function index
. Read moresource§fn translate_call_indirect(
&mut self,
builder: &mut FunctionBuilder<'_>,
table_index: TableIndex,
sig_index: SignatureIndex,
sig_ref: SigRef,
callee: Value,
call_args: &[Value],
) -> WasmResult<Inst>
fn translate_call_indirect( &mut self, builder: &mut FunctionBuilder<'_>, table_index: TableIndex, sig_index: SignatureIndex, sig_ref: SigRef, callee: Value, call_args: &[Value], ) -> WasmResult<Inst>
source§fn translate_call(
&mut self,
builder: &mut FunctionBuilder<'_>,
callee_index: FunctionIndex,
callee: FuncRef,
call_args: &[Value],
) -> WasmResult<Inst>
fn translate_call( &mut self, builder: &mut FunctionBuilder<'_>, callee_index: FunctionIndex, callee: FuncRef, call_args: &[Value], ) -> WasmResult<Inst>
source§fn translate_memory_grow(
&mut self,
pos: FuncCursor<'_>,
index: MemoryIndex,
_heap: Heap,
val: Value,
) -> WasmResult<Value>
fn translate_memory_grow( &mut self, pos: FuncCursor<'_>, index: MemoryIndex, _heap: Heap, val: Value, ) -> WasmResult<Value>
memory.grow
WebAssembly instruction. Read moresource§fn translate_memory_size(
&mut self,
pos: FuncCursor<'_>,
index: MemoryIndex,
_heap: Heap,
) -> WasmResult<Value>
fn translate_memory_size( &mut self, pos: FuncCursor<'_>, index: MemoryIndex, _heap: Heap, ) -> WasmResult<Value>
memory.size
WebAssembly instruction. Read moresource§fn translate_memory_copy(
&mut self,
pos: FuncCursor<'_>,
src_index: MemoryIndex,
_src_heap: Heap,
_dst_index: MemoryIndex,
_dst_heap: Heap,
dst: Value,
src: Value,
len: Value,
) -> WasmResult<()>
fn translate_memory_copy( &mut self, pos: FuncCursor<'_>, src_index: MemoryIndex, _src_heap: Heap, _dst_index: MemoryIndex, _dst_heap: Heap, dst: Value, src: Value, len: Value, ) -> WasmResult<()>
memory.copy
WebAssembly instruction. Read moresource§fn translate_memory_fill(
&mut self,
pos: FuncCursor<'_>,
memory_index: MemoryIndex,
_heap: Heap,
dst: Value,
val: Value,
len: Value,
) -> WasmResult<()>
fn translate_memory_fill( &mut self, pos: FuncCursor<'_>, memory_index: MemoryIndex, _heap: Heap, dst: Value, val: Value, len: Value, ) -> WasmResult<()>
memory.fill
WebAssembly instruction. Read moresource§fn translate_memory_init(
&mut self,
pos: FuncCursor<'_>,
memory_index: MemoryIndex,
_heap: Heap,
seg_index: u32,
dst: Value,
src: Value,
len: Value,
) -> WasmResult<()>
fn translate_memory_init( &mut self, pos: FuncCursor<'_>, memory_index: MemoryIndex, _heap: Heap, seg_index: u32, dst: Value, src: Value, len: Value, ) -> WasmResult<()>
memory.init
WebAssembly instruction. Read moresource§fn translate_data_drop(
&mut self,
pos: FuncCursor<'_>,
seg_index: u32,
) -> WasmResult<()>
fn translate_data_drop( &mut self, pos: FuncCursor<'_>, seg_index: u32, ) -> WasmResult<()>
data.drop
WebAssembly instruction.source§fn translate_table_size(
&mut self,
pos: FuncCursor<'_>,
table_index: TableIndex,
) -> WasmResult<Value>
fn translate_table_size( &mut self, pos: FuncCursor<'_>, table_index: TableIndex, ) -> WasmResult<Value>
table.size
WebAssembly instruction.source§fn translate_table_copy(
&mut self,
pos: FuncCursor<'_>,
dst_table_index: TableIndex,
src_table_index: TableIndex,
dst: Value,
src: Value,
len: Value,
) -> WasmResult<()>
fn translate_table_copy( &mut self, pos: FuncCursor<'_>, dst_table_index: TableIndex, src_table_index: TableIndex, dst: Value, src: Value, len: Value, ) -> WasmResult<()>
table.copy
WebAssembly instruction.source§fn translate_table_init(
&mut self,
pos: FuncCursor<'_>,
seg_index: u32,
table_index: TableIndex,
dst: Value,
src: Value,
len: Value,
) -> WasmResult<()>
fn translate_table_init( &mut self, pos: FuncCursor<'_>, seg_index: u32, table_index: TableIndex, dst: Value, src: Value, len: Value, ) -> WasmResult<()>
table.init
WebAssembly instruction.source§fn translate_elem_drop(
&mut self,
pos: FuncCursor<'_>,
elem_index: u32,
) -> WasmResult<()>
fn translate_elem_drop( &mut self, pos: FuncCursor<'_>, elem_index: u32, ) -> WasmResult<()>
elem.drop
WebAssembly instruction.source§fn translate_atomic_wait(
&mut self,
pos: FuncCursor<'_>,
index: MemoryIndex,
_heap: Heap,
addr: Value,
expected: Value,
timeout: Value,
) -> WasmResult<Value>
fn translate_atomic_wait( &mut self, pos: FuncCursor<'_>, index: MemoryIndex, _heap: Heap, addr: Value, expected: Value, timeout: Value, ) -> WasmResult<Value>
i32.atomic.wait
or i64.atomic.wait
WebAssembly instruction.
The index
provided identifies the linear memory containing the value
to wait on, and heap
is the heap reference returned by make_heap
for the same index. Whether the waited-on value is 32- or 64-bit can be
determined by examining the type of expected
, which must be only I32 or I64. Read moresource§fn translate_atomic_notify(
&mut self,
pos: FuncCursor<'_>,
index: MemoryIndex,
_heap: Heap,
addr: Value,
count: Value,
) -> WasmResult<Value>
fn translate_atomic_notify( &mut self, pos: FuncCursor<'_>, index: MemoryIndex, _heap: Heap, addr: Value, count: Value, ) -> WasmResult<Value>
atomic.notify
WebAssembly instruction.
The index
provided identifies the linear memory containing the value
to wait on, and heap
is the heap reference returned by make_heap
for the same index. Read moresource§fn get_global_type(&self, global_index: GlobalIndex) -> Option<WasmerType>
fn get_global_type(&self, global_index: GlobalIndex) -> Option<WasmerType>
source§fn push_local_decl_on_stack(&mut self, ty: WasmerType)
fn push_local_decl_on_stack(&mut self, ty: WasmerType)
source§fn push_params_on_stack(&mut self, function_index: LocalFunctionIndex)
fn push_params_on_stack(&mut self, function_index: LocalFunctionIndex)
source§fn get_local_type(&self, local_index: u32) -> Option<WasmerType>
fn get_local_type(&self, local_index: u32) -> Option<WasmerType>
source§fn get_local_types(&self) -> &[WasmerType]
fn get_local_types(&self) -> &[WasmerType]
source§fn get_function_type(
&self,
function_index: FunctionIndex,
) -> Option<&FunctionType>
fn get_function_type( &self, function_index: FunctionIndex, ) -> Option<&FunctionType>
source§fn get_function_sig(&self, sig_index: SignatureIndex) -> Option<&FunctionType>
fn get_function_sig(&self, sig_index: SignatureIndex) -> Option<&FunctionType>
source§fn heap_access_spectre_mitigation(&self) -> bool
fn heap_access_spectre_mitigation(&self) -> bool
source§fn proof_carrying_code(&self) -> bool
fn proof_carrying_code(&self) -> bool
source§fn heaps(&self) -> &PrimaryMap<Heap, HeapData>
fn heaps(&self) -> &PrimaryMap<Heap, HeapData>
source§fn is_wasm_return(&self, signature: &Signature, index: usize) -> bool
fn is_wasm_return(&self, signature: &Signature, index: usize) -> bool
source§fn return_mode(&self) -> ReturnMode
fn return_mode(&self) -> ReturnMode
fallthrough_return
instruction at the end
of the function body, rather than return
instructions as needed? This is used by VMs
to append custom epilogues.source§fn update_global(
&mut self,
_builder: &mut FunctionBuilder<'_>,
_global_index: u32,
_value: Value,
)
fn update_global( &mut self, _builder: &mut FunctionBuilder<'_>, _global_index: u32, _value: Value, )
source§fn translate_loop_header(&mut self, _pos: FuncCursor<'_>) -> WasmResult<()>
fn translate_loop_header(&mut self, _pos: FuncCursor<'_>) -> WasmResult<()>
source§fn before_translate_operator(
&mut self,
_op: &Operator<'_>,
_builder: &mut FunctionBuilder<'_>,
_state: &FuncTranslationState,
) -> WasmResult<()>
fn before_translate_operator( &mut self, _op: &Operator<'_>, _builder: &mut FunctionBuilder<'_>, _state: &FuncTranslationState, ) -> WasmResult<()>
FunctionEnvMutironment
performing this translation to maintain
internal state or prepare custom state for the operator to translatesource§fn after_translate_operator(
&mut self,
_op: &Operator<'_>,
_builder: &mut FunctionBuilder<'_>,
_state: &FuncTranslationState,
) -> WasmResult<()>
fn after_translate_operator( &mut self, _op: &Operator<'_>, _builder: &mut FunctionBuilder<'_>, _state: &FuncTranslationState, ) -> WasmResult<()>
FunctionEnvMutironment
performing this translation to maintain
internal state or finalize custom state for the operator that was translatedsource§fn before_unconditionally_trapping_memory_access(
&mut self,
_builder: &mut FunctionBuilder<'_>,
) -> WasmResult<()>
fn before_unconditionally_trapping_memory_access( &mut self, _builder: &mut FunctionBuilder<'_>, ) -> WasmResult<()>
FuncEnvironment
performing this translation
to maintain, prepare, or finalize custom, internal state when we
statically determine that a Wasm memory access will unconditionally
trap, rendering the rest of the block unreachable. Called just before
the unconditional trap is emitted.source§fn handle_before_return(
&mut self,
_retvals: &[Value],
_builder: &mut FunctionBuilder<'_>,
)
fn handle_before_return( &mut self, _retvals: &[Value], _builder: &mut FunctionBuilder<'_>, )
source§fn before_load(
&mut self,
_builder: &mut FunctionBuilder<'_>,
_val_size: u8,
_addr: Value,
_offset: u64,
)
fn before_load( &mut self, _builder: &mut FunctionBuilder<'_>, _val_size: u8, _addr: Value, _offset: u64, )
source§fn before_store(
&mut self,
_builder: &mut FunctionBuilder<'_>,
_val_size: u8,
_addr: Value,
_offset: u64,
)
fn before_store( &mut self, _builder: &mut FunctionBuilder<'_>, _val_size: u8, _addr: Value, _offset: u64, )
source§impl<'module_environment> TargetEnvironment for FuncEnvironment<'module_environment>
impl<'module_environment> TargetEnvironment for FuncEnvironment<'module_environment>
source§fn target_config(&self) -> TargetFrontendConfig
fn target_config(&self) -> TargetFrontendConfig
source§fn pointer_type(&self) -> Type
fn pointer_type(&self) -> Type
source§fn pointer_bytes(&self) -> u8
fn pointer_bytes(&self) -> u8
source§fn reference_type(&self) -> Type
fn reference_type(&self) -> Type
Auto Trait Implementations§
impl<'module_environment> Freeze for FuncEnvironment<'module_environment>
impl<'module_environment> RefUnwindSafe for FuncEnvironment<'module_environment>
impl<'module_environment> Send for FuncEnvironment<'module_environment>
impl<'module_environment> Sync for FuncEnvironment<'module_environment>
impl<'module_environment> Unpin for FuncEnvironment<'module_environment>
impl<'module_environment> UnwindSafe for FuncEnvironment<'module_environment>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more