pub struct SharedJitState { /* private fields */ }Expand description
VM-wide shared JIT table synchronized across all kernel task Stores via epoch.
Implementations§
pub fn new(enabled: bool) -> Self
pub fn stats(&self) -> JitStats
Sourcepub fn caps(&self, has_table: bool, memory64: bool) -> i32
pub fn caps(&self, has_table: bool, memory64: bool) -> i32
Return the kw_host_jit_caps() bitmask.
Sourcepub fn sync_task<T: 'static>(
&self,
store: impl AsContextMut<Data = T>,
engine: &Engine,
memory: &SharedMemory,
task_jit: &mut TaskJitState,
) -> Result<()>
pub fn sync_task<T: 'static>( &self, store: impl AsContextMut<Data = T>, engine: &Engine, memory: &SharedMemory, task_jit: &mut TaskJitState, ) -> Result<()>
Lock-free fast-path check; instantiates any newly compiled/freed JIT slots into store.
Sourcepub fn compile<T: 'static>(
&self,
store: impl AsContextMut<Data = T>,
engine: &Engine,
memory: &SharedMemory,
task_jit: &mut TaskJitState,
wasm_bytes: &[u8],
slot: u32,
flags: i32,
) -> i32
pub fn compile<T: 'static>( &self, store: impl AsContextMut<Data = T>, engine: &Engine, memory: &SharedMemory, task_jit: &mut TaskJitState, wasm_bytes: &[u8], slot: u32, flags: i32, ) -> i32
Compile a guest-emitted Wasm module for slot and install it into the current task + shared cache.
Sourcepub fn free<T: 'static>(
&self,
store: impl AsContextMut<Data = T>,
task_jit: &mut TaskJitState,
slot: u32,
)
pub fn free<T: 'static>( &self, store: impl AsContextMut<Data = T>, task_jit: &mut TaskJitState, slot: u32, )
Free slot, restoring the saved fallback entry in this task and marking it freed globally.
Auto Trait Implementations§
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