pub fn code(
    code: CodeSectionReader,
    translation_ctx: &SimpleContext,
) -> Result<TranslatedCodeSection, Error> {
    let func_count = code.get_count();
    let mut session = CodeGenSession::new(func_count, translation_ctx);

    for (idx, body) in code.into_iter().enumerate() {
        let body = body?;
        let mut relocs = UnimplementedRelocSink;

        function_body::translate_wasm(&mut session, &mut relocs, idx as u32, &body)?;
    }

    Ok(session.into_translated_code_section()?)
}
/// Parses the Code section of the wasm module.
Parses the Code section of the wasm module.
Parses the Code section of the wasm module .
pub fn code(
    code: CodeSectionReader,
    translation_ctx: &SimpleContext,
) -> Result<TranslatedCodeSection, Error> {
    let func_count = code.get_count();
    let mut session = CodeGenSession::new(func_count, translation_ctx);
    for (idx, body) in code.into_iter().enumerate() {
        let body = body?;
        let mut relocs = UnimplementedRelocSink;
        function_body::translate_wasm(&mut session, &mut relocs, idx as u32, &body)?;
    }
    Ok(session.into_translated_code_section()?)
}
pub fn code ( code : CodeSectionReader , translation_ctx : & SimpleContext , ) -> Result < TranslatedCodeSection , Error > { let func_count = code . get_count ( ) ; let mut session = CodeGenSession :: new ( func_count , translation_ctx ) ; for ( idx , body ) in code . into_iter ( ) . enumerate ( ) { let body = body ? ; let mut relocs = UnimplementedRelocSink ; function_body :: translate_wasm ( & mut session , & mut relocs , idx as u32 , & body ) ? ; } Ok ( session . into_translated_code_section ( ) ? ) }
Parses the Code section of the wasm module.
Parses the Code section of the wasm module .
code
CodeSectionReader
translation_ctx
&SimpleContext
code
CodeSectionReader
translation_ctx
&SimpleContext