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

Method verify_module_impl

language/move-bytecode-verifier/src/check_duplication.rs:35–52  ·  view source on GitHub ↗
(module: &'a CompiledModule)

Source from the content-addressed store, hash-verified

33 }
34
35 fn verify_module_impl(module: &'a CompiledModule) -> PartialVMResult<()> {
36 Self::check_identifiers(module.identifiers())?;
37 Self::check_address_identifiers(module.address_identifiers())?;
38 Self::check_constants(module.constant_pool())?;
39 Self::check_signatures(module.signatures())?;
40 Self::check_module_handles(module.module_handles())?;
41 Self::check_module_handles(module.friend_decls())?;
42 Self::check_struct_handles(module.struct_handles())?;
43 Self::check_function_handles(module.function_handles())?;
44 Self::check_function_instantiations(module.function_instantiations())?;
45
46 let checker = Self { module };
47 checker.check_field_handles()?;
48 checker.check_field_instantiations()?;
49 checker.check_function_defintions()?;
50 checker.check_struct_definitions()?;
51 checker.check_struct_instantiations()
52 }
53
54 pub fn verify_script(module: &'a CompiledScript) -> VMResult<()> {
55 Self::verify_script_impl(module).map_err(|e| e.finish(Location::Script))

Callers

nothing calls this directly

Calls 14

identifiersMethod · 0.45
address_identifiersMethod · 0.45
constant_poolMethod · 0.45
signaturesMethod · 0.45
module_handlesMethod · 0.45
friend_declsMethod · 0.45
struct_handlesMethod · 0.45
function_handlesMethod · 0.45
check_field_handlesMethod · 0.45

Tested by

no test coverage detected