pub struct Compiler { /* private fields */ }
Expand description
A WebAssembly code JIT compiler.
A Compiler
instance owns the executable memory that it allocates.
TODO: Evolve this to support streaming rather than requiring a &[u8]
containing a whole wasm module at once.
TODO: Consider using cranelift-module.
Implementations§
Source§impl Compiler
impl Compiler
Sourcepub fn new(
isa: Box<dyn TargetIsa>,
strategy: CompilationStrategy,
cache_config: CacheConfig,
tunables: Tunables,
) -> Self
pub fn new( isa: Box<dyn TargetIsa>, strategy: CompilationStrategy, cache_config: CacheConfig, tunables: Tunables, ) -> Self
Construct a new Compiler
.
Source§impl Compiler
impl Compiler
Sourcepub fn frontend_config(&self) -> TargetFrontendConfig
pub fn frontend_config(&self) -> TargetFrontendConfig
Return the target’s frontend configuration settings.
Sourcepub fn interrupts(&self) -> &Arc<VMInterrupts>
pub fn interrupts(&self) -> &Arc<VMInterrupts>
Return the handle by which to interrupt instances
Sourcepub fn signatures(&self) -> &SignatureRegistry
pub fn signatures(&self) -> &SignatureRegistry
Shared signature registry.
Sourcepub fn is_in_jit_code(&self, addr: usize) -> bool
pub fn is_in_jit_code(&self, addr: usize) -> bool
Returns whether or not the given address falls within the JIT code managed by the compiler
Auto Trait Implementations§
impl !Freeze for Compiler
impl !RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl !UnwindSafe for Compiler
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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