QuickBEAM.VM.InstructionDecoder (QuickBEAM v0.10.9)

Copy Markdown View Source

Decodes a raw QuickJS function bytecode body into VM instruction tuples.

Returns a list of {opcode_integer, args} indexed by instruction position (NOT byte offset). Labels are resolved to instruction indices via a byte-offset-to-index map. Opcodes are raw integer tags for O(1) BEAM JIT jump-table dispatch.

Summary

Functions

Decodes a QuickJS function bytecode body into structured VM instructions.

Types

instruction()

@type instruction() :: {non_neg_integer(), [term()]}

Functions

decode(byte_code, arg_count \\ 0)

Decodes a QuickJS function bytecode body into structured VM instructions.