Lisp compiler design

This isn't exactly for Lisp, but for Scheme (a lisp derivative), but we used this free (as in beer) text in my programming languages class. Here's the link:

http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/

Keep in mind, however, that they're teaching how to write a Scheme interpreter in none other than Scheme. It kind of twists your mind in knots at first, but it gets clearer after a while. I'm not exactly sure if this is what you're looking, but it's a start and illustrates some of the more important things to think about.


Here is a great overview of a compiler design for Scheme: An Incremental Approach to Compiler Construction. It's a quite short article that describes how to build a machine code compiler for Scheme "from scratch".


Lisp in small pieces is probably the best book on implementing Lisp. Highly recommended. Probably available through some used book service. It might be expensive, even as a used book. It is a translation from the French original. There is also a revised version in French, which hasn't been translated to English - unfortunately.

I would also recommend Paradigms of Artificial Intelligence Programming, Case Studies in Common Lisp by Peter Norvig. It contains the description of a Scheme compiler written in Common Lisp. Generally this is an outstanding book.

Also see this Biblography on Scheme implementation techniques.

For Common Lisp there are articles available and some Common Lisp compilers are coming with a little bit of documentation of implementation and compiler internals. Usually the compiler can't be seen in isolation, but should be seen in combination with the runtime it compiles to (GC, instruction sets, memory management in general, threading, FFI interfaces, ...). See for example the Design of CMU Common Lisp.