[−][src]Struct wasmer_clif_fork_wasm::DummyEnvironment
This ModuleEnvironment
implementation is a "naïve" one, doing essentially nothing and
emitting placeholders when forced to. Don't try to execute code translated for this
environment, essentially here for translation debug purposes.
Fields
info: DummyModuleInfo
Module information.
func_bytecode_sizes: Vec<usize>
Vector of wasm bytecode size for each function.
Methods
impl DummyEnvironment
[src]
pub fn new(
config: TargetFrontendConfig,
return_mode: ReturnMode,
debug_info: bool
) -> Self
[src]
config: TargetFrontendConfig,
return_mode: ReturnMode,
debug_info: bool
) -> Self
Creates a new DummyEnvironment
instance.
pub fn func_env(&self) -> DummyFuncEnvironment
[src]
Return a DummyFuncEnvironment
for translating functions within this
DummyEnvironment
.
pub fn get_num_func_imports(&self) -> usize
[src]
Return the number of imported functions within this DummyEnvironment
.
Trait Implementations
impl<'data> ModuleEnvironment<'data> for DummyEnvironment
[src]
fn target_config(&self) -> TargetFrontendConfig
[src]
fn declare_signature(&mut self, sig: Signature)
[src]
fn declare_func_import(
&mut self,
sig_index: SignatureIndex,
module: &'data str,
field: &'data str
)
[src]
&mut self,
sig_index: SignatureIndex,
module: &'data str,
field: &'data str
)
fn declare_func_type(&mut self, sig_index: SignatureIndex)
[src]
fn declare_global(&mut self, global: Global)
[src]
fn declare_global_import(
&mut self,
global: Global,
module: &'data str,
field: &'data str
)
[src]
&mut self,
global: Global,
module: &'data str,
field: &'data str
)
fn declare_table(&mut self, table: Table)
[src]
fn declare_table_import(
&mut self,
table: Table,
module: &'data str,
field: &'data str
)
[src]
&mut self,
table: Table,
module: &'data str,
field: &'data str
)
fn declare_table_elements(
&mut self,
_table_index: TableIndex,
_base: Option<GlobalIndex>,
_offset: usize,
_elements: Box<[FuncIndex]>
)
[src]
&mut self,
_table_index: TableIndex,
_base: Option<GlobalIndex>,
_offset: usize,
_elements: Box<[FuncIndex]>
)
fn declare_memory(&mut self, memory: Memory)
[src]
fn declare_memory_import(
&mut self,
memory: Memory,
module: &'data str,
field: &'data str
)
[src]
&mut self,
memory: Memory,
module: &'data str,
field: &'data str
)
fn declare_data_initialization(
&mut self,
_memory_index: MemoryIndex,
_base: Option<GlobalIndex>,
_offset: usize,
_data: &'data [u8]
)
[src]
&mut self,
_memory_index: MemoryIndex,
_base: Option<GlobalIndex>,
_offset: usize,
_data: &'data [u8]
)
fn declare_func_export(&mut self, func_index: FuncIndex, name: &'data str)
[src]
fn declare_table_export(&mut self, table_index: TableIndex, name: &'data str)
[src]
fn declare_memory_export(&mut self, memory_index: MemoryIndex, name: &'data str)
[src]
fn declare_global_export(&mut self, global_index: GlobalIndex, name: &'data str)
[src]
fn declare_start_func(&mut self, func_index: FuncIndex)
[src]
fn define_function_body(
&mut self,
body_bytes: &'data [u8],
body_offset: usize
) -> WasmResult<()>
[src]
&mut self,
body_bytes: &'data [u8],
body_offset: usize
) -> WasmResult<()>
fn reserve_signatures(&mut self, _num: u32)
[src]
Provides the number of signatures up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_imports(&mut self, _num: u32)
[src]
Provides the number of imports up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn finish_imports(&mut self)
[src]
Notifies the implementation that all imports have been declared.
fn reserve_func_types(&mut self, _num: u32)
[src]
Provides the number of defined functions up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_tables(&mut self, _num: u32)
[src]
Provides the number of defined tables up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_memories(&mut self, _num: u32)
[src]
Provides the number of defined memories up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_globals(&mut self, _num: u32)
[src]
Provides the number of defined globals up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_exports(&mut self, _num: u32)
[src]
Provides the number of exports up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn finish_exports(&mut self)
[src]
Notifies the implementation that all exports have been declared.
fn reserve_table_elements(&mut self, _num: u32)
[src]
Provides the number of element initializers up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
fn reserve_data_initializers(&mut self, _num: u32)
[src]
Provides the number of data initializers up front. By default this does nothing, but implementations can use this to preallocate memory if desired. Read more
Auto Trait Implementations
impl Unpin for DummyEnvironment
impl Sync for DummyEnvironment
impl Send for DummyEnvironment
impl RefUnwindSafe for DummyEnvironment
impl UnwindSafe for DummyEnvironment
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,