fn build_module_tables(
    binary: &VersionedBinary,
    tables: &[Table],
    module: &mut CompiledModule,
) -> BinaryLoaderResult<()> {
    for table in tables {
        match table.kind {
            TableType::STRUCT_DEFS => {
                load_struct_defs(binary, table, &mut module.struct_defs)?;
            }
            TableType::STRUCT_DEF_INST => {
                load_struct_instantiations(binary, table, &mut module.struct_def_instantiations)?;
            }
            TableType::FUNCTION_DEFS => {
                load_function_defs(binary, table, &mut module.function_defs)?;
            }
            TableType::FIELD_HANDLE => {
                load_field_handles(binary, table, &mut module.field_handles)?;
            }
            TableType::FIELD_INST => {
                load_field_instantiations(binary, table, &mut module.field_instantiations)?;
            }
            TableType::FRIEND_DECLS => {
                load_module_handles(binary, table, &mut module.friend_decls)?;
            }
            TableType::MODULE_HANDLES
            | TableType::STRUCT_HANDLES
            | TableType::FUNCTION_HANDLES
            | TableType::FUNCTION_INST
            | TableType::IDENTIFIERS
            | TableType::ADDRESS_IDENTIFIERS
            | TableType::CONSTANT_POOL
            | TableType::SIGNATURES => {
                continue;
            }
        }
    }
    Ok(())
}
/// Builds tables related to a `CompiledModule`.
Builds tables related to a `CompiledModule`.
Builds tables related to a ` CompiledModule ` .
fn build_module_tables(
    binary: &VersionedBinary,
    tables: &[Table],
    module: &mut CompiledModule,
) -> BinaryLoaderResult<()> {
    for table in tables {
        match table.kind {
            TableType::STRUCT_DEFS => {
                load_struct_defs(binary, table, &mut module.struct_defs)?;
            }
            TableType::STRUCT_DEF_INST => {
                load_struct_instantiations(binary, table, &mut module.struct_def_instantiations)?;
            }
            TableType::FUNCTION_DEFS => {
                load_function_defs(binary, table, &mut module.function_defs)?;
            }
            TableType::FIELD_HANDLE => {
                load_field_handles(binary, table, &mut module.field_handles)?;
            }
            TableType::FIELD_INST => {
                load_field_instantiations(binary, table, &mut module.field_instantiations)?;
            }
            TableType::FRIEND_DECLS => {
                load_module_handles(binary, table, &mut module.friend_decls)?;
            }
            TableType::MODULE_HANDLES
            | TableType::STRUCT_HANDLES
            | TableType::FUNCTION_HANDLES
            | TableType::FUNCTION_INST
            | TableType::IDENTIFIERS
            | TableType::ADDRESS_IDENTIFIERS
            | TableType::CONSTANT_POOL
            | TableType::SIGNATURES => {
                continue;
            }
        }
    }
    Ok(())
}
fn build_module_tables ( binary : & VersionedBinary , tables : & [ Table ] , module : & mut CompiledModule , ) -> BinaryLoaderResult < ( ) > { for table in tables { match table . kind { TableType :: STRUCT_DEFS => { load_struct_defs ( binary , table , & mut module . struct_defs ) ? ; } TableType :: STRUCT_DEF_INST => { load_struct_instantiations ( binary , table , & mut module . struct_def_instantiations ) ? ; } TableType :: FUNCTION_DEFS => { load_function_defs ( binary , table , & mut module . function_defs ) ? ; } TableType :: FIELD_HANDLE => { load_field_handles ( binary , table , & mut module . field_handles ) ? ; } TableType :: FIELD_INST => { load_field_instantiations ( binary , table , & mut module . field_instantiations ) ? ; } TableType :: FRIEND_DECLS => { load_module_handles ( binary , table , & mut module . friend_decls ) ? ; } TableType :: MODULE_HANDLES | TableType :: STRUCT_HANDLES | TableType :: FUNCTION_HANDLES | TableType :: FUNCTION_INST | TableType :: IDENTIFIERS | TableType :: ADDRESS_IDENTIFIERS | TableType :: CONSTANT_POOL | TableType :: SIGNATURES => { continue ; } } } Ok ( ( ) ) }
Builds tables related to a `CompiledModule`.
Builds tables related to a ` CompiledModule ` .
binary
&VersionedBinary
tables
&[Table]
module
&mut CompiledModule