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

Function verify_context

cranelift/codegen/src/verifier/mod.rs:278–294  ·  view source on GitHub ↗

Verify `func` after checking the integrity of associated context data structures `cfg` and `domtree`.

(
    func: &Function,
    cfg: &ControlFlowGraph,
    domtree: &DominatorTree,
    fisa: FOI,
    errors: &mut VerifierErrors,
)

Source from the content-addressed store, hash-verified

276/// Verify `func` after checking the integrity of associated context data structures `cfg` and
277/// `domtree`.
278pub fn verify_context<'a, FOI: Into<FlagsOrIsa<'a>>>(
279 func: &Function,
280 cfg: &ControlFlowGraph,
281 domtree: &DominatorTree,
282 fisa: FOI,
283 errors: &mut VerifierErrors,
284) -> VerifierStepResult {
285 let _tt = timing::verifier();
286 let verifier = Verifier::new(func, fisa.into());
287 if cfg.is_valid() {
288 verifier.cfg_integrity(cfg, errors)?;
289 }
290 if domtree.is_valid() {
291 verifier.domtree_integrity(domtree, errors)?;
292 }
293 verifier.run(errors)
294}
295
296#[derive(Clone, Copy, Debug)]
297enum BlockCallTargetType {

Callers 1

verifyMethod · 0.85

Calls 5

cfg_integrityMethod · 0.80
domtree_integrityMethod · 0.80
newFunction · 0.50
is_validMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected