KidLisp: a closure compiler, on by a ; @compile directive master
lib/kidlisp-compile.mjs compiles a program once, when the source changes, into a tree of closures with names resolved to frame slots, and paint runs that tree instead of walking the AST. No code is generated at runtime; a closure is a prepared piece of the interpreter. It takes arithmetic, comparisons, if/else, def/now, later and calls, repeat, pools, and the drawing and sound calls of the global table with evaluated arguments. Forms that register behaviour or keep a clock (tap, draw, lift, once, timers) are handed to the interpreter at top level unchanged, and the voices take their arguments raw anywhere. A program it cannot take runs on the interpreter as before, with a warning. Globals stay in the interpreter's globalDef, so a tap handler sees the same values. On the two Whistlegraph pieces in Node the draw streams match the interpreter's and a frame costs 33 ms instead of 150 (Fía) and 70 ms instead of 700 (shooter). Scoping is lexical: the interpreter lets a callee see its caller's locals, and the pieces no longer rely on that (a star's radius field was named like the camera's roll). Worker bundle rebuilt.