Sat Oct 9 00:59:37 CEST 2010

lambda as EXP

The modified ANF which only uses variable references as values then

   EXP ::= (app VAR VAR ...)
        |  (let (VAR EXP) EXP)
        |  (begin EXP EXP)
        |  (set! VAR VAR)
        |  (if VAR EXP EXP)
        |  (quote DATUM)
        |  (lambda (VAR ...) EXP)

Of these only `begin' and `let' push continuation frames.

Encoding the vm is fairly straightforward. (just need to take care to
also restore environments!)

It will probably work better with local labels though; encoding as
functions needs too many trampolines.  But before going on it might be
best to abstract the data structures a bit more.  CAR and CDR can get

Ok, got computed goto VM written out.  It seems quite simple
actually. Now I only need op_app.