pub struct ThunkCodegen { /* private fields */ }Expand description
Generates code for thunk (lazy) operations.
Implementations§
Source§impl ThunkCodegen
impl ThunkCodegen
Sourcepub fn emit_alloc_thunk(&mut self, fn_name: &str) -> Vec<NativeInst>
pub fn emit_alloc_thunk(&mut self, fn_name: &str) -> Vec<NativeInst>
Emit a thunk allocation wrapping a function pointer.
Sourcepub fn emit_force_thunk(&mut self, thunk_reg: Register) -> Vec<NativeInst>
pub fn emit_force_thunk(&mut self, thunk_reg: Register) -> Vec<NativeInst>
Emit a thunk force (evaluate the lazy value).
Sourcepub fn emit_is_evaluated(&mut self, thunk_reg: Register) -> Vec<NativeInst>
pub fn emit_is_evaluated(&mut self, thunk_reg: Register) -> Vec<NativeInst>
Emit a check whether a thunk has already been evaluated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThunkCodegen
impl RefUnwindSafe for ThunkCodegen
impl Send for ThunkCodegen
impl Sync for ThunkCodegen
impl Unpin for ThunkCodegen
impl UnsafeUnpin for ThunkCodegen
impl UnwindSafe for ThunkCodegen
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