Skip to main content

finish

Function finish 

Source
pub fn finish(
    func: &mut Func,
    allocation: &Allocation,
    frame: &Frame,
    locals: &[(Inst, usize)],
    conv: &CallRegs,
    insts: &FrameInsts,
    names: &mut Interner,
)
Expand description

Writes the moves, the prologue and the epilogue into a function the allocator has finished with.

ยงPanics

Panics on a function with no blocks in it, on a frame whose slots or locals the allocation and the lowering do not match, and on a move of a class the target did not say how to move. All of them are the caller handing it a frame and a function that were not worked out from each other.