Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The Next Symta

Name: Anonymous 2014-03-12 19:27

An experimental Lisp-like language:
https://github.com/saniv/symta

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: Anonymous 2014-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))))

((LABEL "f1302187") (LABEL "f1302189") (BASIC LOAD "r1302193" "env" 0)
(BASIC LOAD "r1302194" "r1302193" 1) (BASIC LOAD "r1302195" "env" 1)
(BASIC * "r1302192" "r1302194" "r1302195") (BASIC LOAD "r1302196" "env" 0)
(BASIC LOAD "r1302197" "r1302196" 2)
(BASIC + "r1302191" "r1302192" "r1302197") (RETURN "r1302191")
(BASIC CLOSURE "r1302190" "f1302189") (RETURN "r1302190")
(BASIC CLOSURE "r1302188" "f1302187"))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List