#[repr(C, align(16))]pub struct VMContext {
pub alloc_ptr: *mut u8,
pub alloc_limit: *const u8,
pub gc_trigger: unsafe extern "C" fn(*mut VMContext),
pub tail_callee: *mut u8,
pub tail_arg: *mut u8,
}Expand description
VM context passed as implicit first argument to all JIT-compiled functions.
Layout is frozen: gc_trigger reads fields by offset. alloc_ptr at 0, alloc_limit at 8, gc_trigger at 16, tail_callee at 24, tail_arg at 32.
Fields§
§alloc_ptr: *mut u8Current bump-pointer allocation cursor.
alloc_limit: *const u8End of the current nursery region.
gc_trigger: unsafe extern "C" fn(*mut VMContext)Host function called when alloc_ptr exceeds alloc_limit.
tail_callee: *mut u8TCO: pending tail-call callee (closure pointer), null if no pending tail call.
tail_arg: *mut u8TCO: pending tail-call argument, null if no pending tail call.
Implementations§
Auto Trait Implementations§
impl Freeze for VMContext
impl RefUnwindSafe for VMContext
impl !Send for VMContext
impl !Sync for VMContext
impl Unpin for VMContext
impl UnsafeUnpin for VMContext
impl UnwindSafe for VMContext
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