Produces a flat instruction stream suitable for run_bytecode().
Compilation is a post-order tree walk; each leaf emits a LIT or VAR,
each interior node emits an EML. The constants pool deduplicates
identical literals (eml(1, eml(1, x)) has one shared entry for 1).
Value
A list with elements:
opsinteger vector of opcodes (0 LIT, 1 VAR, 2 EML).
argsinteger vector of opcode arguments (constant index for LIT, variable index for VAR, 0 for EML).
constscomplex vector — the deduplicated constants pool.
varscharacter vector — variable names in declaration order.
max_stackinteger — the peak stack depth required.
sourcethe original
expr, for inspection.
See also
run_bytecode() for executing the compiled output;
eml_eval() for the slower tree-walking evaluator.
