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

Function verify_function

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

Verify `func`.

(
    func: &Function,
    fisa: FOI,
)

Source from the content-addressed store, hash-verified

258
259/// Verify `func`.
260pub fn verify_function<'a, FOI: Into<FlagsOrIsa<'a>>>(
261 func: &Function,
262 fisa: FOI,
263) -> VerifierResult<()> {
264 let _tt = timing::verifier();
265 let mut errors = VerifierErrors::default();
266 let verifier = Verifier::new(func, fisa.into());
267 let result = verifier.run(&mut errors);
268 if errors.is_empty() {
269 result.unwrap();
270 Ok(())
271 } else {
272 Err(errors)
273 }
274}
275
276/// Verify `func` after checking the integrity of associated context data structures `cfg` and
277/// `domtree`.

Callers 9

verify_testfileFunction · 0.85
runMethod · 0.85
sample_functionFunction · 0.85
br_table_with_argsFunction · 0.85
unreachable_useFunction · 0.85
check_for_crashMethod · 0.85
switch_errorFunction · 0.85
switch_errorFunction · 0.85

Calls 5

OkFunction · 0.85
newFunction · 0.50
runMethod · 0.45
is_emptyMethod · 0.45
unwrapMethod · 0.45

Tested by 6

runMethod · 0.68
br_table_with_argsFunction · 0.68
unreachable_useFunction · 0.68
switch_errorFunction · 0.68
switch_errorFunction · 0.68