Expand description
Text disassembly, in exactly the format the reference implementation prints.
This exists to be diffed. The reference compiler, built with
-DDUMP_BYTECODE=1, prints its bytecode through js_dump_function_bytecode
and dump_byte_code, and the differential test compares that text with ours
character by character. Keeping the format identical means a mismatch points
straight at the instruction that differs rather than at a formatting detail.
Format reference: js_dump_function_bytecode and dump_byte_code in
quickjs.c.
Functions§
- decode_
operands - Decode one instruction’s operands from its payload bytes.
- disassemble_
code - Print the instruction stream.
- disassemble_
function - Print a function the way
js_dump_function_bytecodedoes. - disassemble_
program - Print a whole program in the order the reference emits it.
- long_
to_ short - The short form a long instruction folds into, for the assembler.
- print_
atom - Print an atom the way
js_print_atom2does.