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

Method verify

language/move-bytecode-verifier/src/stack_usage_verifier.rs:27–42  ·  view source on GitHub ↗
(
        resolver: &'a BinaryIndexedView<'a>,
        function_view: &'a FunctionView,
    )

Source from the content-addressed store, hash-verified

25
26impl<'a> StackUsageVerifier<'a> {
27 pub(crate) fn verify(
28 resolver: &'a BinaryIndexedView<'a>,
29 function_view: &'a FunctionView,
30 ) -> PartialVMResult<()> {
31 let verifier = Self {
32 resolver,
33 current_function: function_view.index(),
34 code: function_view.code(),
35 return_: function_view.return_(),
36 };
37
38 for block_id in function_view.cfg().blocks() {
39 verifier.verify_block(block_id, function_view.cfg())?
40 }
41 Ok(())
42 }
43
44 fn verify_block(&self, block_id: BlockId, cfg: &dyn ControlFlowGraph) -> PartialVMResult<()> {
45 let code = &self.code.code;

Callers

nothing calls this directly

Calls 6

cfgMethod · 0.80
verify_blockMethod · 0.80
indexMethod · 0.45
codeMethod · 0.45
return_Method · 0.45
blocksMethod · 0.45

Tested by

no test coverage detected