Compiler terms
Compilers are the translators that turn human-readable source code into something a machine can execute. This category covers lexing, parsing, abstract syntax trees, semantic analysis, optimisation passes, code generation, and just-in-time compilation. Understanding how compilers work illuminates why languages behave the way they do and how to write code that compiles to faster output.
More on Compiler
History
Compilers emerged in the 1950s as a solution to reduce manual machine-code programming, with FORTRAN (1957) representing the first widely-used production compiler. Early compilers were simple single-pass translators, but the field matured through the 1960s–70s with formal language theory (context-free grammars, automata) enabling more sophisticated multi-pass designs and optimization techniques. The development of compiler-compiler tools like yacc and lex in the 1970s standardized lexing and parsing, while the rise of portable languages (C, Pascal) drove demand for retargetable compilers across different architectures. Modern compiler design incorporates sophisticated static analysis, intermediate representations (IRs), and adaptive optimizations—including just-in-time (JIT) compilation for dynamic languages—reflecting decades of research into balancing compilation speed, code quality, and runtime performance across diverse hardware and language ecosystems.
Key concepts
- Lexing & Parsing
- Abstract Syntax Tree (AST)
- Bytecode VMs
- Memory Management — Stack vs Heap
- Garbage Collection
- JIT Compilation
- Dead Code Elimination
Best references
-
LLVM Documentation Reference implementation of modern compiler infrastructure; essential for understanding AST, intermediate code, register allocation, and optimization strategies used across industry compilers.
-
The Java Virtual Machine Specification Canonical specification for bytecode VMs, opcode semantics, JIT compilation, and garbage collection—directly relevant to understanding runtime compilation and memory management.
-
Crafting Interpreters Free, interactive guide to building lexers, parsers, and VMs; excellent practical introduction to lexing & parsing, bytecode generation, and AST manipulation.
-
Compilers: Principles, Techniques, and Tools (The Dragon Book) Seminal academic reference covering syntax analysis, intermediate code generation, code optimization, and symbol tables—authoritative for compiler theory across this category.
Typed relationships here
Edges touching a Compiler term.
- Garbage Collection Enables Weak References (WeakReference, WeakMap) 3d
- Weak References (WeakReference, WeakMap) Leverages Garbage Collection 4d
- Garbage Collection Mitigates Memory Leak 4d
- Garbage Collection Specializes Memory Management — Stack vs Heap 4d
- PHPStan Levels 0–9 Explained Leverages Abstract Syntax Tree (AST) 5d