Skip to main content

OsrEntryFn

Type Alias OsrEntryFn 

Source
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 a JITContext with locals pre-filled from the interpreter frame (marshaled using the OsrEntryPoint.local_kinds).

§Returns

  • 0 - Success: execution completed. Modified locals are in JITContext.locals. The VM reads them back and continues at OsrEntryPoint.exit_ip.
  • i32::MIN+1 - Deopt requested: a type guard failed mid-loop. The VM reads locals from JITContext.locals and resumes at the DeoptInfo.resume_ip for the failing guard.
  • Other negative - Error.