Of course that is a prototype, but it shows how initial parentheses-ridden mess (root/boot/*.hit files) bootstraps into a readable language (root/lib/*.hit files).
Name:
Anonymous2014-03-18 14:59
It appears that efficiently compiling closures requires a lot of code analysis.
For now I wrote an SSA-translator, which looks very much like CPS translator, but a little more convoluted, because SSA's continuation (the value function pops to return to the previous context) is implicit and passed on the stack. Still basic operators like "load" and "funcall" require explicitly specifying, where you want to store value. Here is how I expand lambdas' into SSA (test-ssa '(|_fn| (a b) (|_fn| (x) (+ (* a x) b))))