Implementing Closures in a Compiled Lisp
zmedley.comHi HN. I wrote this up after feeling frustrated about a lack of information online about compiling closures. My hope is that is is useful to other people who get stuck at that point in writing their compiler.
The Lisp[1] I'm writing that I based this on is actually built on Cranelift[2] which has been a fun experience to work with. I'd love whatever feedback and questions people have.
[1] https://github.com/ZekeMedley/lustc/ [2] https://github.com/bytecodealliance/wasmtime/tree/main/crane...