#[unsafe(no_mangle)]pub unsafe extern "C" fn patch_seq_push_closure(
stack: Stack,
fn_ptr: u64,
capture_count: i32,
) -> StackExpand description
Create closure from function pointer and stack values (all-in-one helper)
Pops capture_count values from stack (top-down order), creates environment,
makes closure, and pushes it onto the stack.
This is a convenience function for LLVM codegen that handles the entire closure creation process in one call. Uses Arc for TCO support.
ยงSafety
- fn_ptr must be a valid function pointer
- stack must have at least
capture_countvalues