Skip to main content

Module closure

Module closure 

Source
Expand description

Closure Creation

Functions for creating closures with captured values.

Functions§

jit_alloc_owned_mut_cell⚠
Allocate a heap cell for an OwnedMutable closure capture.
jit_alloc_owned_mut_cell_bool⚠
jit_alloc_owned_mut_cell_f64⚠
jit_alloc_owned_mut_cell_i8⚠
jit_alloc_owned_mut_cell_i16⚠
jit_alloc_owned_mut_cell_i32⚠
jit_alloc_owned_mut_cell_i64⚠
jit_alloc_owned_mut_cell_ptr⚠
jit_alloc_owned_mut_cell_u8⚠
jit_alloc_owned_mut_cell_u16⚠
jit_alloc_owned_mut_cell_u32⚠
jit_alloc_owned_mut_cell_u64⚠
jit_alloc_shared_cell⚠
Allocate a fresh Arc<SharedCell> from initial_bits and return the raw pointer bits of the strong share.
jit_arc_closure_release
Release an Arc<HeapValue> strong-count share for a NativeKind::Ptr(HeapKind::Closure) slot. Mirror of jit_arc_closure_retain — uses Arc::decrement_strong_count::<HeapValue> per Rust Arc contract. Reaching refcount zero runs HeapValue::Drop (which dispatches the ClosureRaw arm and retires the OwnedClosureBlock’s typed-closure header refcount via the block’s own Drop).
jit_arc_closure_retain
Retain (clone) an Arc<HeapValue> strong-count share for a NativeKind::Ptr(HeapKind::Closure) slot. Bumps the standard Rust Arc refcount at offset -16 of the Arc::into_raw pointer.
jit_arc_shared_release⚠
Release exactly one strong share of an Arc<SharedCell> at ptr. ptr == 0 is a no-op, matching the interpreter’s op_drop_shared_local null-pointer guard (the slot is overwritten with 0 after drop, so re-drops are silent).
jit_arc_shared_retain⚠
Retain a Shared capture’s Arc<SharedCell> strong share.
jit_finalize_heap_closure⚠
Closure-spec Phase H2 → §14.6 (H6.5): wrap an H1-allocated TypedClosureHeader block into a NaN-boxed Arc<HeapValue::ClosureRaw> bits value.
jit_make_closureDeprecated
Create a closure with captured values from the stack.
jit_read_owned_mut_cell_bool⚠
jit_read_owned_mut_cell_f64⚠
jit_read_owned_mut_cell_i8⚠
jit_read_owned_mut_cell_i16⚠
jit_read_owned_mut_cell_i32⚠
jit_read_owned_mut_cell_i64⚠
jit_read_owned_mut_cell_ptr⚠
jit_read_owned_mut_cell_u8⚠
jit_read_owned_mut_cell_u16⚠
jit_read_owned_mut_cell_u32⚠
jit_read_owned_mut_cell_u64⚠
jit_read_shared_cell_bool⚠
jit_read_shared_cell_f64⚠
jit_read_shared_cell_i8⚠
jit_read_shared_cell_i16⚠
jit_read_shared_cell_i32⚠
jit_read_shared_cell_i64⚠
jit_read_shared_cell_ptr⚠
jit_read_shared_cell_u8⚠
jit_read_shared_cell_u16⚠
jit_read_shared_cell_u32⚠
jit_read_shared_cell_u64⚠
jit_shared_lock_contended⚠
Contended lock-slow-path helper for Shared capture reads/writes.
jit_shared_unlock_contended⚠
Contended unlock-slow-path helper for Shared capture reads/writes.
jit_write_owned_mut_cell_bool⚠
jit_write_owned_mut_cell_f64⚠
jit_write_owned_mut_cell_i8⚠
jit_write_owned_mut_cell_i16⚠
jit_write_owned_mut_cell_i32⚠
jit_write_owned_mut_cell_i64⚠
jit_write_owned_mut_cell_ptr⚠
jit_write_owned_mut_cell_u8⚠
jit_write_owned_mut_cell_u16⚠
jit_write_owned_mut_cell_u32⚠
jit_write_owned_mut_cell_u64⚠
jit_write_shared_cell_bool⚠
jit_write_shared_cell_f64⚠
jit_write_shared_cell_i8⚠
jit_write_shared_cell_i16⚠
jit_write_shared_cell_i32⚠
jit_write_shared_cell_i64⚠
jit_write_shared_cell_ptr⚠
jit_write_shared_cell_u8⚠
jit_write_shared_cell_u16⚠
jit_write_shared_cell_u32⚠
jit_write_shared_cell_u64⚠