Expand description
Pre-decode PVM bytecode into a flat instruction stream for fast codegen.
Replaces the byte-by-byte bitmask scan in the codegen loop with a single
upfront decode pass. The codegen then iterates a &[PreDecodedInst] slice,
eliminating redundant compute_skip() and decode_args() calls.
Structs§
- PreDecoded
Inst - Pre-decoded PVM instruction. Stores everything the codegen and the gas simulator need per instruction.
Functions§
- compute_
gas_ blocks - Compute gas block start bitmap from raw code+bitmask (no full Args decoding).
Returns
Vec<bool>indexed by PVM byte offset. True = this PC starts a gas block. - predecode
- Pre-decode all instructions from raw code+bitmask into a flat array.