0011. The walking skeleton compiles the AST straight to C
- Status: Superseded by 0016
- Date: 2026-10-29
- Plan: M1.5–M1.10, M3.3
Context
The first goal is a working language as early as possible. The review asks for a typed IR from the start, but there are no types until M2.
Decision
M1 emits C directly from the AST. Every value is an
int64_t, and string literals appear only as arguments
to print and println. M3.3 replaces this
path with typed AST → Core IR → C and deletes the direct path. Tag
cp/1.2-fib keeps the direct version reachable for
comparison.
Alternatives considered
- Build the IR before anything runs — delays the first running program by a milestone and designs the IR without feedback.
Consequences
Some M1 code generation is thrown away in M3. The golden tests written in M1 keep their value: they guard the replacement.