pub fn finalize(mut self, mut procedure_debug: ProcedureDebug) -> Chunk {
        // Calculate the total stack frame needed
        let mut frame_size = -self.max_stack_top;
        // Align it as per ABI requirement
        if frame_size % 16 == 8 {
            frame_size += 8;
        }
        procedure_debug.frame_size = frame_size as u32;
        // Patch the prologue to allocate the stack frame
        self.code[7..11].copy_from_slice(&frame_size.to_le_bytes());
        Chunk {
            name: self.name,
            code: self.code,
            links: self.links,
            extra: ChunkExtra::Procedure(procedure_debug),
        }
    }
// Finalize code generation for this chunk
Finalize code generation for this chunk
Finalize code generation for this chunk
pub fn finalize(mut self, mut procedure_debug: ProcedureDebug) -> Chunk {
        // Calculate the total stack frame needed
        let mut frame_size = -self.max_stack_top;
        // Align it as per ABI requirement
        if frame_size % 16 == 8 {
            frame_size += 8;
        }
        procedure_debug.frame_size = frame_size as u32;
        // Patch the prologue to allocate the stack frame
        self.code[7..11].copy_from_slice(&frame_size.to_le_bytes());
        Chunk {
            name: self.name,
            code: self.code,
            links: self.links,
            extra: ChunkExtra::Procedure(procedure_debug),
        }
    }
pub fn finalize ( mut self , mut procedure_debug : ProcedureDebug ) -> Chunk { // Calculate the total stack frame needed let mut frame_size = - self . max_stack_top ; // Align it as per ABI requirement if frame_size % 16 == 8 { frame_size += 8 ; } procedure_debug . frame_size = frame_size as u32 ; // Patch the prologue to allocate the stack frame self . code [ 7 .. 11 ] . copy_from_slice ( & frame_size . to_le_bytes ( ) ) ; Chunk { name : self . name , code : self . code , links : self . links , extra : ChunkExtra :: Procedure ( procedure_debug ) , } }
Finalize code generation for this chunk
Finalize code generation for this chunk
mut self
procedure_debug
ProcedureDebug