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

Function dispatch

pulley/src/interp/tail_loop.rs:84–96  ·  view source on GitHub ↗
(
    state: &mut MachineState,
    pc: UnsafeBytecodeStream,
    executing_pc: ExecutingPcRef<'_>,
)

Source from the content-addressed store, hash-verified

82}
83
84fn dispatch(
85 state: &mut MachineState,
86 pc: UnsafeBytecodeStream,
87 executing_pc: ExecutingPcRef<'_>,
88) -> Done {
89 // Perform a dynamic dispatch through a function pointer indexed by
90 // opcode.
91 let mut debug = debug(state, pc, executing_pc);
92 debug.before_visit();
93 let Ok(opcode) = Opcode::decode(debug.bytecode());
94 let handler = OPCODE_HANDLER_TABLE[opcode as usize];
95 tail_call!(handler(debug.0.state, debug.0.pc, debug.0.executing_pc));
96}
97
98/// Same as `Interpreter::run`, except for extended opcodes.
99fn run_extended(

Callers 1

runMethod · 0.85

Calls 4

decodeFunction · 0.85
debugFunction · 0.70
before_visitMethod · 0.45
bytecodeMethod · 0.45

Tested by

no test coverage detected