MCPcopy Create free account
hub / github.com/diem/move / load_function_defs

Function load_function_defs

language/move-binary-format/src/deserializer.rs:1191–1204  ·  view source on GitHub ↗

Builds the `FunctionDefinition` table.

(
    binary: &VersionedBinary,
    table: &Table,
    func_defs: &mut Vec<FunctionDefinition>,
)

Source from the content-addressed store, hash-verified

1189
1190/// Builds the `FunctionDefinition` table.
1191fn load_function_defs(
1192 binary: &VersionedBinary,
1193 table: &Table,
1194 func_defs: &mut Vec<FunctionDefinition>,
1195) -> BinaryLoaderResult<()> {
1196 let start = table.offset as usize;
1197 let end = start + table.count as usize;
1198 let mut cursor = binary.new_cursor(start, end);
1199 while cursor.position() < u64::from(table.count) {
1200 let func_def = load_function_def(&mut cursor)?;
1201 func_defs.push(func_def);
1202 }
1203 Ok(())
1204}
1205
1206fn load_field_handles(
1207 binary: &VersionedBinary,

Callers 1

build_module_tablesFunction · 0.85

Calls 4

load_function_defFunction · 0.85
new_cursorMethod · 0.80
positionMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected