pub type OsrEntryFn = unsafe extern "C" fn(*mut JITContext) -> i32;Expand description
OSR entry function signature.
This has the same binary signature as JittedStrategyFn – the difference
is semantic: for OSR entry, the caller pre-fills JITContext.locals from
the interpreter’s live frame before invocation, and reads modified locals
back on return.
§Arguments
ctx_ptr- Pointer to aJITContextwith locals pre-filled from the interpreter frame (marshaled using theOsrEntryPoint.local_kinds).
§Returns
0- Success: execution completed. Modified locals are inJITContext.locals. The VM reads them back and continues atOsrEntryPoint.exit_ip.i32::MIN+1- Deopt requested: a type guard failed mid-loop. The VM reads locals fromJITContext.localsand resumes at theDeoptInfo.resume_ipfor the failing guard.- Other negative - Error.