fn build_script_tables(
    _binary: &VersionedBinary,
    tables: &[Table],
    _script: &mut CompiledScript,
) -> BinaryLoaderResult<()> {
    for table in tables {
        match table.kind {
            TableType::MODULE_HANDLES
            | TableType::STRUCT_HANDLES
            | TableType::FUNCTION_HANDLES
            | TableType::FUNCTION_INST
            | TableType::SIGNATURES
            | TableType::IDENTIFIERS
            | TableType::ADDRESS_IDENTIFIERS
            | TableType::CONSTANT_POOL => {
                continue;
            }
            TableType::STRUCT_DEFS
            | TableType::STRUCT_DEF_INST
            | TableType::FUNCTION_DEFS
            | TableType::FIELD_INST
            | TableType::FIELD_HANDLE
            | TableType::FRIEND_DECLS => {
                return Err(PartialVMError::new(StatusCode::MALFORMED)
                    .with_message("Bad table in Script".to_string()));
            }
        }
    }
    Ok(())
}
/// Builds tables related to a `CompiledScript`.
Builds tables related to a `CompiledScript`.
Builds tables related to a ` CompiledScript ` .
fn build_script_tables(
    _binary: &VersionedBinary,
    tables: &[Table],
    _script: &mut CompiledScript,
) -> BinaryLoaderResult<()> {
    for table in tables {
        match table.kind {
            TableType::MODULE_HANDLES
            | TableType::STRUCT_HANDLES
            | TableType::FUNCTION_HANDLES
            | TableType::FUNCTION_INST
            | TableType::SIGNATURES
            | TableType::IDENTIFIERS
            | TableType::ADDRESS_IDENTIFIERS
            | TableType::CONSTANT_POOL => {
                continue;
            }
            TableType::STRUCT_DEFS
            | TableType::STRUCT_DEF_INST
            | TableType::FUNCTION_DEFS
            | TableType::FIELD_INST
            | TableType::FIELD_HANDLE
            | TableType::FRIEND_DECLS => {
                return Err(PartialVMError::new(StatusCode::MALFORMED)
                    .with_message("Bad table in Script".to_string()));
            }
        }
    }
    Ok(())
}
fn build_script_tables ( _binary : & VersionedBinary , tables : & [ Table ] , _script : & mut CompiledScript , ) -> BinaryLoaderResult < ( ) > { for table in tables { match table . kind { TableType :: MODULE_HANDLES | TableType :: STRUCT_HANDLES | TableType :: FUNCTION_HANDLES | TableType :: FUNCTION_INST | TableType :: SIGNATURES | TableType :: IDENTIFIERS | TableType :: ADDRESS_IDENTIFIERS | TableType :: CONSTANT_POOL => { continue ; } TableType :: STRUCT_DEFS | TableType :: STRUCT_DEF_INST | TableType :: FUNCTION_DEFS | TableType :: FIELD_INST | TableType :: FIELD_HANDLE | TableType :: FRIEND_DECLS => { return Err ( PartialVMError :: new ( StatusCode :: MALFORMED ) . with_message ( " " . to_string ( ) ) ) ; } } } Ok ( ( ) ) }
Builds tables related to a `CompiledScript`.
Builds tables related to a ` CompiledScript ` .
_binary
&VersionedBinary
tables
&[Table]
_script
&mut CompiledScript