pub struct BackendAdapter<B: JitBackend, P: HotnessPolicy = ThresholdPolicy> { /* private fields */ }Expand description
Beadie wired to a single JIT backend.
Implementations§
Source§impl<B: JitBackend> BackendAdapter<B>
impl<B: JitBackend> BackendAdapter<B>
Source§impl<B: JitBackend, P: HotnessPolicy> BackendAdapter<B, P>
impl<B: JitBackend, P: HotnessPolicy> BackendAdapter<B, P>
pub fn with_policy(backend: B, policy: P) -> Self
pub fn register( &self, core: CoreHandle, on_invalidate: Option<Box<dyn Fn() + Send + Sync>>, ) -> BoundBead<B>
pub fn on_invoke<F>(&self, bound: &BoundBead<B>, factory: F) -> Option<*mut ()>
Sourcepub fn on_invoke_osr<F>(
&self,
bound: &BoundBead<B>,
factory: F,
) -> Option<*mut ()>
pub fn on_invoke_osr<F>( &self, bound: &BoundBead<B>, factory: F, ) -> Option<*mut ()>
OSR-aware dispatch.
The factory returns an OsrBuild — the backend function def plus
one OsrEntry per hot loop header the compiled code will expose.
The adapter compiles def via the backend and publishes both the
main entry and the OSR table atomically on the bead.
Back-edge probes in the runtime use Bead::osr_entry to look up
a resume point and transfer a live interpreter frame into native code.
pub fn prune(&self)
pub fn reload_all(&self) -> usize
pub fn reload_matching(&self, pred: impl Fn(&Arc<Bead>) -> bool) -> usize
pub fn chain_len(&self) -> usize
pub fn beadie(&self) -> &Beadie<P>
pub fn backend(&self) -> &Arc<B>
Auto Trait Implementations§
impl<B, P> Freeze for BackendAdapter<B, P>where
P: Freeze,
impl<B, P = ThresholdPolicy> !RefUnwindSafe for BackendAdapter<B, P>
impl<B, P> Send for BackendAdapter<B, P>
impl<B, P> Sync for BackendAdapter<B, P>
impl<B, P> Unpin for BackendAdapter<B, P>where
P: Unpin,
impl<B, P> UnsafeUnpin for BackendAdapter<B, P>where
P: UnsafeUnpin,
impl<B, P = ThresholdPolicy> !UnwindSafe for BackendAdapter<B, P>
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