pub fn chunkify_code(bytecode: &[u8]) -> Vec<CodeChunk>Expand description
Chunkify bytecode into 31-byte chunks with PUSHDATA tracking.
Returns a vector of code chunks. Each chunk contains:
- 1 byte: count of leading bytes that are PUSHDATA
- 31 bytes: the actual code/data
This allows code analysis to skip PUSHDATA bytes when looking for valid opcodes.
The leading PUSHDATA count is always bounded by CODE_CHUNK_DATA_SIZE (31),
so all casts to u8 are safe.