IT lexicon › Programming › Code Generation

Code Generation

Programming På svenska → Updated: 2026-11-12

The final compiler phase that transforms an abstract syntax tree into machine code or intermediate code.

After parsing and semantic analysis, it's time to produce actual executables—or in modern systems, intermediate code for a virtual machine. The code generator walks the AST recursively and emits instructions for the target architecture, allocating registers and applying optimizations. For interpreters, it generates instructions for a stack machine or similar.

← Back to the lexicon