Struct wasmtime_jit::CompiledModule [−][src]
A compiled wasm module, ready to be instantiated.
Implementations
impl CompiledModule
[src]
pub fn from_artifacts_list(
artifacts: Vec<CompilationArtifacts>,
isa: &dyn TargetIsa,
profiler: &dyn ProfilingAgent
) -> Result<Vec<Self>, SetupError>
[src]
artifacts: Vec<CompilationArtifacts>,
isa: &dyn TargetIsa,
profiler: &dyn ProfilingAgent
) -> Result<Vec<Self>, SetupError>
Creates a list of compiled modules from the given list of compilation artifacts.
pub fn from_artifacts(
artifacts: CompilationArtifacts,
isa: &dyn TargetIsa,
profiler: &dyn ProfilingAgent
) -> Result<Self, SetupError>
[src]
artifacts: CompilationArtifacts,
isa: &dyn TargetIsa,
profiler: &dyn ProfilingAgent
) -> Result<Self, SetupError>
Creates CompiledModule
directly from CompilationArtifacts
.
pub unsafe fn instantiate(
&self,
imports: Imports<'_>,
lookup_shared_signature: &dyn Fn(SignatureIndex) -> VMSharedSignatureIndex,
mem_creator: Option<&dyn RuntimeMemoryCreator>,
interrupts: *const VMInterrupts,
host_state: Box<dyn Any>,
externref_activations_table: *mut VMExternRefActivationsTable,
stack_map_registry: *mut StackMapRegistry
) -> Result<InstanceHandle, InstantiationError>
[src]
&self,
imports: Imports<'_>,
lookup_shared_signature: &dyn Fn(SignatureIndex) -> VMSharedSignatureIndex,
mem_creator: Option<&dyn RuntimeMemoryCreator>,
interrupts: *const VMInterrupts,
host_state: Box<dyn Any>,
externref_activations_table: *mut VMExternRefActivationsTable,
stack_map_registry: *mut StackMapRegistry
) -> Result<InstanceHandle, InstantiationError>
Crate an Instance
from this CompiledModule
.
Note that if only one instance of this module is needed, it may be more
efficient to call the top-level instantiate
, since that avoids copying
the data initializers.
Unsafety
See InstanceHandle::new
pub fn compilation_artifacts(&self) -> &CompilationArtifacts
[src]
Extracts CompilationArtifacts
from the compiled module.
pub fn data_initializers(&self) -> Vec<DataInitializer<'_>>
[src]
Returns data initializers to pass to InstanceHandle::initialize
pub fn module(&self) -> &Arc<Module>
[src]
Return a reference-counting pointer to a module.
pub fn module_mut(&mut self) -> Option<&mut Module>
[src]
Return a reference to a mutable module (if possible).
pub fn finished_functions(
&self
) -> &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>
[src]
&self
) -> &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>
Returns the map of all finished JIT functions compiled for this module
pub fn trampolines(&self) -> &PrimaryMap<SignatureIndex, VMTrampoline>
[src]
Returns the per-signature trampolines for this module.
pub fn stack_maps(
&self
) -> impl Iterator<Item = (*mut [VMFunctionBody], &[StackMapInformation])>
[src]
&self
) -> impl Iterator<Item = (*mut [VMFunctionBody], &[StackMapInformation])>
Returns the stack map information for all functions defined in this module.
The iterator returned iterates over the span of the compiled function in memory with the stack maps associated with those bytes.
pub fn trap_information(
&self
) -> impl Iterator<Item = (DefinedFuncIndex, *mut [VMFunctionBody], &[TrapInformation], &FunctionAddressMap)>
[src]
&self
) -> impl Iterator<Item = (DefinedFuncIndex, *mut [VMFunctionBody], &[TrapInformation], &FunctionAddressMap)>
Iterates over all functions in this module, returning information about how to decode traps which happen in the function.
pub fn jit_code_ranges<'a>(
&'a self
) -> impl Iterator<Item = (usize, usize)> + 'a
[src]
&'a self
) -> impl Iterator<Item = (usize, usize)> + 'a
Returns all ranges convered by JIT code.
pub fn code(&self) -> &Arc<ModuleCode>
[src]
Returns module’s JIT code.
pub fn symbolize_context(&self) -> Result<Option<SymbolizeContext>, Error>
[src]
Creates a new symbolication context which can be used to further symbolicate stack traces.
Basically this makes a thing which parses debuginfo and can tell you what filename and line number a wasm pc comes from.
pub fn has_unparsed_debuginfo(&self) -> bool
[src]
Returns whether the original wasm module had unparsed debug information based on the tunables configuration.
Auto Trait Implementations
impl RefUnwindSafe for CompiledModule
impl Send for CompiledModule
impl Sync for CompiledModule
impl Unpin for CompiledModule
impl UnwindSafe for CompiledModule
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,