Get the latest tech news

Compiling a Lisp: Lambda lifting


first – previous

We keep the same labels dict for the entire recursive traversal of the program, but we modify bound at each binding site and free only at lambdas. Since we know by construction that these are all strings, we don’t need to worry about having weird recursion issues around keeping track of a moving heap pointer. I’ll start by showing the code for labelcall because it’s a good stepping stone toward funcall(nice job, Dr Ghuloum!

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Lisp

Lisp

Photo of Lambda Lifting

Lambda Lifting

Related news:

News photo

Build Your Own Lisp

News photo

Fundamental Problems of Lisp, the Cons Cell (2024)

News photo

The Art of Lisp and Writing (2003)