Ignition Bytecode Format

The full list of supported bytecodes is found in src/interpreter/bytecodes.h. This document aims to give a high-level overview of the actual bytecodes.

Extended width operands

These are prefixes for other bytecodes to change the range of valid indices that can be encoded.

Wide <bytecode> <operands>...

Changes the following <bytecode> to use 16-bit encoding for operands instead of 8-bit.

ExtraWide <bytecode> <operands>...

Changes the following <bytecode> to use 32-bit encoding for operands instead of 8-bit.

Loading the accumulator

LdaZero

Loads the number 0 into the accumulator register.

LdaSmi <imm>

Loads the number <imm> into the accumulator register.

LdaUndefined

Loads the undefined value into the accumulator register.

LdaNull

Loads the null value into the accumulator register.

LdaTheHole

Loads the special the_hole value into the accumulator register, which is used to implement temporal dead zones (TDZs).

LdaTrue

Loads the true value into the accumulator register.

LdaFalse

Loads the false value into the accumulator register.

LdaConstant <idx>

Loads the value at the given <idx> from the constant tables into the accumular register.