pub fn verify_trusted_opcodes(
program: &BytecodeProgram,
) -> Result<(), Vec<VerifyError>>Expand description
Verify that all trusted opcodes in a program are well-formed.
Post-ADR-006 §2.7.7 the two surviving trusted opcodes (LoadLocalTrusted,
JumpIfFalseTrusted) source slot kind from the stack
parallel-Vec<NativeKind> track, not the FrameDescriptor — see the
module doc comment (WS-10b). The descriptor-presence rule that used to
live here was stale (it fired 16 false positives on a clean stdlib
prelude) and is removed. The verifier still checks the invariant that is
still real: each trusted opcode carries the operand shape its executor
requires, so a future malformed trusted opcode still surfaces.
Returns Ok(()) if all trusted opcodes pass verification, or a list of
all violations found.