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

Method verify_jump_table

cranelift/codegen/src/verifier/mod.rs:877–896  ·  view source on GitHub ↗
(
        &self,
        inst: Inst,
        j: JumpTable,
        errors: &mut VerifierErrors,
    )

Source from the content-addressed store, hash-verified

875 }
876
877 fn verify_jump_table(
878 &self,
879 inst: Inst,
880 j: JumpTable,
881 errors: &mut VerifierErrors,
882 ) -> VerifierStepResult {
883 if !self.func.stencil.dfg.jump_tables.is_valid(j) {
884 errors.nonfatal((
885 inst,
886 self.context(inst),
887 format!("invalid jump table reference {j}"),
888 ))
889 } else {
890 let pool = &self.func.stencil.dfg.value_lists;
891 for block in self.func.stencil.dfg.jump_tables[j].all_branches() {
892 self.verify_block(inst, block.block(pool), errors)?;
893 }
894 Ok(())
895 }
896 }
897
898 fn verify_exception_table(
899 &self,

Callers 1

Calls 7

OkFunction · 0.85
nonfatalMethod · 0.80
verify_blockMethod · 0.80
is_validMethod · 0.45
contextMethod · 0.45
all_branchesMethod · 0.45
blockMethod · 0.45

Tested by

no test coverage detected