Add in another, more low-level IR (hence the name LIR)
High level goals
Closer to machine instructions (removing more high-level concepts like
primop, conditional, letrec, closure creation, etc.)
Creates room for instruction selection (doesn't seem to be useful though, for this functional language).
Agnostic to
memory layout, e.g., stack and heap.
calling convention
register set
Determines memory representation of different types of data.
Determines word size.
Testing
I don't think it's terribly helpful to test Lir, or I just don't see a good way of testing it.
I implemented pretty-printing to help debugging later, but from this point on I'll stick with executable as compiler integration test.
Add in another, more low-level IR (hence the name LIR)
High level goals
Testing
I don't think it's terribly helpful to test Lir, or I just don't see a good way of testing it. I implemented pretty-printing to help debugging later, but from this point on I'll stick with executable as compiler integration test.