Opening Compilation
Compilation
- Length
- 46 min
- Level
- Undergraduate
- Recorded
- MIT2019
Chapter 1 of 7: Before the lecture
Compiling Lisp for a register machine begins from the explicit control evaluator built in earlier sessions of MIT 6.001. An interpreter configures a machine to emulate a high-level language, whereas a compiler lowers the program to machine language. A zeroth-order compiler runs the evaluator over the code and records the register operations instead of executing them. Static knowledge of which registers each sub-expression needs and modifies then removes the interpreter's pessimistic saves and restores. Code sequences become data structures of instructions, needed registers and modified registers, appended with a save and restore only where required. The generated code for recursive factorial is read block by block.

Your comment is kept while you sign up.Sign in
Turns the explicit control evaluator into a compiler that saves and restores registers only where needed.
Compiling Lisp for a register machine begins from the explicit control evaluator built in earlier sessions of MIT 6.001. An interpreter configures a machine to emulate a high-level language, whereas a compiler lowers the program to machine language. A zeroth-order compiler runs the evaluator over the code and records the register operations instead of executing them. Static knowledge of which registers each sub-expression needs and modifies then removes the interpreter's pessimistic saves and restores. Code sequences become data structures of instructions, needed registers and modified registers, appended with a save and restore only where required. The generated code for recursive factorial is read block by block.
This lecture
Lecture 14 of 21 of Structure and Interpretation of Computer Programs (SICP).
Choose a node to see how it connects to this lecture. What comes before is on the leftat the top. What comes after is on the rightat the bottom. The ring is what it teaches. People and places are above.
Press a chosen node again to open it.