fn estimate_insts(fv: &MuFunctionVersion) -> usize {
    let f_content = fv.content.as_ref().unwrap();

    let mut insts = 0;

    for block in f_content.blocks.values() {
        let ref body = block.content.as_ref().unwrap().body;

        for inst in body.iter() {
            use compiler::backend;

            match inst.v {
                TreeNode_::Value(_) => unreachable!(),
                TreeNode_::Instruction(ref inst) => {
                    insts += backend::estimate_insts_for_ir(inst);
                }
            }
        }
    }

    insts
}
/// calculate estimate machine instruction for a Mu function
calculate estimate machine instruction for a Mu function
calculate estimate machine instruction for a Mu function
fn estimate_insts(fv: &MuFunctionVersion) -> usize {
    let f_content = fv.content.as_ref().unwrap();
    let mut insts = 0;
    for block in f_content.blocks.values() {
        let ref body = block.content.as_ref().unwrap().body;
        for inst in body.iter() {
            use compiler::backend;
            match inst.v {
                TreeNode_::Value(_) => unreachable!(),
                TreeNode_::Instruction(ref inst) => {
                    insts += backend::estimate_insts_for_ir(inst);
                }
            }
        }
    }
    insts
}
fn estimate_insts ( fv : & MuFunctionVersion ) -> usize { let f_content = fv . content . as_ref ( ) . unwrap ( ) ; let mut insts = 0 ; for block in f_content . blocks . values ( ) { let ref body = block . content . as_ref ( ) . unwrap ( ) . body ; for inst in body . iter ( ) { use compiler :: backend ; match inst . v { TreeNode_ :: Value ( _ ) => unreachable ! ( ) , TreeNode_ :: Instruction ( ref inst ) => { insts += backend :: estimate_insts_for_ir ( inst ) ; } } } } insts }
calculate estimate machine instruction for a Mu function
calculate estimate machine instruction for a Mu function
fv
&MuFunctionVersion
fv
&MuFunctionVersion