Tue Jul 15 14:27:47 EDT 2014
state machine compiler: sm/sm.rkt
- all "lexical" variable allocated as globals
- tail calls are "gotos with arguments", i.e. they never return
- recursive function calls are inlined
Later maybe optimize inlining to real function calls if there are no
yield calls in the dynamic extent.
One necssary optimization is to reduce the memory footprint. This is
related to register allocation. The number of registers is not
limited: it just needs to be minimal. Does this make the problem
easier? It could also be left to the C compiler.
The language needs conditionals to be useful. Problem is that it only
does straight line compilation now. Split into basic blocks?