AST-to-bytecode compiler.
Walks the AST once and emits a flat bytecode representation that the VM can execute without tree-walking overhead.