Skip to main content

slice_function

Function slice_function 

Source
pub fn slice_function(program: &CompiledProgram, fi: usize) -> FnBytecode
Expand description

Lift function fi out of program into a self-contained FnBytecode with 0-relative jumps. The body is program.code[entry_pc..end] (where end is the next function’s entry, or the end of code); its absolute jump targets are rebased by -entry_pc, so they index into the returned code directly.