MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / verify_block

Method verify_block

cranelift/codegen/src/verifier/mod.rs:762–777  ·  view source on GitHub ↗
(
        &self,
        loc: impl Into<AnyEntity>,
        e: Block,
        errors: &mut VerifierErrors,
    )

Source from the content-addressed store, hash-verified

760 }
761
762 fn verify_block(
763 &self,
764 loc: impl Into<AnyEntity>,
765 e: Block,
766 errors: &mut VerifierErrors,
767 ) -> VerifierStepResult {
768 if !self.func.dfg.block_is_valid(e) || !self.func.layout.is_block_inserted(e) {
769 return errors.fatal((loc, format!("invalid block reference {e}")));
770 }
771 if let Some(entry_block) = self.func.layout.entry_block() {
772 if e == entry_block {
773 return errors.fatal((loc, format!("invalid reference to entry block {e}")));
774 }
775 }
776 Ok(())
777 }
778
779 fn verify_sig_ref(
780 &self,

Callers 3

verify_jump_tableMethod · 0.80

Calls 5

OkFunction · 0.85
block_is_validMethod · 0.80
is_block_insertedMethod · 0.80
fatalMethod · 0.80
entry_blockMethod · 0.45

Tested by

no test coverage detected