pub fn dummy_procedure_module(code: Vec<Bytecode>) -> CompiledModule {
    let mut module = empty_module();
    let mut code_unit = CodeUnit::default();
    code_unit.code = code;
    let mut fun_def = FunctionDefinition::default();
    fun_def.code = Some(code_unit);

    let fun_handle = FunctionHandle {
        module: ModuleHandleIndex(0),
        name: IdentifierIndex(0),
        parameters: SignatureIndex(0),
        return_: SignatureIndex(0),
        type_parameters: vec![],
    };

    module.function_handles.push(fun_handle);
    module.function_defs.push(fun_def);
    module.freeze().unwrap()
}
/// Create a dummy module to wrap the bytecode program in local@code
Create a dummy module to wrap the bytecode program in local@code
Create a dummy module to wrap the bytecode program in local@code
pub fn dummy_procedure_module(code: Vec<Bytecode>) -> CompiledModule {
    let mut module = empty_module();
    let mut code_unit = CodeUnit::default();
    code_unit.code = code;
    let mut fun_def = FunctionDefinition::default();
    fun_def.code = Some(code_unit);
    let fun_handle = FunctionHandle {
        module: ModuleHandleIndex(0),
        name: IdentifierIndex(0),
        parameters: SignatureIndex(0),
        return_: SignatureIndex(0),
        type_parameters: vec![],
    };
    module.function_handles.push(fun_handle);
    module.function_defs.push(fun_def);
    module.freeze().unwrap()
}
pub fn dummy_procedure_module ( code : Vec < Bytecode > ) -> CompiledModule { let mut module = empty_module ( ) ; let mut code_unit = CodeUnit :: default ( ) ; code_unit . code = code ; let mut fun_def = FunctionDefinition :: default ( ) ; fun_def . code = Some ( code_unit ) ; let fun_handle = FunctionHandle { module : ModuleHandleIndex ( 0 ) , name : IdentifierIndex ( 0 ) , parameters : SignatureIndex ( 0 ) , return_ : SignatureIndex ( 0 ) , type_parameters : vec ! [ ] , } ; module . function_handles . push ( fun_handle ) ; module . function_defs . push ( fun_def ) ; module . freeze ( ) . unwrap ( ) }
Create a dummy module to wrap the bytecode program in local@code
Create a dummy module to wrap the bytecode program in local@code
code
Vec<Bytecode>
code
Vec<Bytecode>