Compilers Roadmap

Ten levels, following the pipeline. Each one ends with something you can actually do, not something you have merely read.

01What Happens to My Code

0/17

Trace a program from the characters you typed to the moment something executes, name which stage would report a given error before you look, and choose an execution strategy for a new language — interpreter, bytecode VM, ahead-of-time native — from the constraints rather than from taste.

02Syntax: Grammar, Lexing, Parsing, Diagnostics

0/31

Write a grammar that settles precedence and associativity instead of leaving them ambiguous, hand-write a lexer and either a recursive-descent or a Pratt parser against it, and recover from a syntax error well enough to report the second one — with a message that names what was expected.

03Meaning: Trees, Names and Scopes

0/14

Design AST nodes that later passes can pattern-match on without knowing the grammar, build a symbol table that resolves every identifier to a declaration under shadowing, and say for any given error whether it belongs to the parser, the resolver or the type checker.

04Types: What the Language Can Prove

0/26

Apply a typing rule by hand, run unification far enough to infer a type nobody wrote down, decide between erasure, reification and monomorphization knowing what each costs at run time, and read an ownership or lifetime error as the proof obligation it actually is.

05The Middle End: IR, CFG, SSA, Data Flow

0/28

Lower an AST to three-address code, split it into basic blocks and build the dominator tree, insert phi nodes in the right places and leave SSA again without breaking the program, and run a data-flow analysis to a fixed point on paper.

06Optimization, Loops and Legality

0/24

Apply the classic transformations by hand and state the precondition that makes each one legal, predict which of them a compiler will decline to apply to your code and why, and explain a surprising result in terms of undefined behavior or the as-if rule rather than in terms of cleverness.

07The Back End: Code Generation, Registers, ABI

0/22

Follow IR through instruction selection and scheduling to encoded bytes, allocate registers under pressure and predict which value spills before you run the allocator, and read an ABI closely enough to explain why two objects that both compiled will not link.

08Linking, Runtimes and Compiling at Run Time

0/43

Diagnose a link failure from the symbol it names, design a bytecode instruction set and the dispatch loop that runs it, explain a JIT deoptimization from the guard that failed, and lower a closure, an exception or an async function to ordinary control flow with pencil and paper.

09Real Pipelines, Infrastructure and DSLs

0/26

Describe the actual route from source to behavior for Python, JavaScript, TypeScript, C++, Rust and Go without flattening six different stories into one, use LLVM and WebAssembly as the things they are rather than as brand names, and turn down a DSL proposal for reasons you can defend.

10Correctness, Tooling, Builds and AtlasLang

0/53

Test a compiler the way its own authors do, work inside an optimized build without being defeated by debug info, keep a large build proportional to the change rather than to the codebase, validate a model-generated plan as the untrusted program it is, and finish AtlasLang end to end.