Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Back end (summary)

The back end is probably the easiest part to understand,


since we've already developed a keen understanding of
quasiquotation.

Produces a C function for each rule


Trades space for speed
Not that much space either: ~ 30 insns / rule at -O2
Pre-calculates a lot
Only needs stat(), system(), and write()
Many other tradeoffs possible

Can perform domain-specific optimizations


Topological sort done at compile time
Missing build rules directly fail when called
Dead build rules not compiled into executable
Common dependency DAG nodes refer to same function
All messages pre-formatted
All string lengths known, for write()

You might also like