Opening Structure and Interpretation of Computer Programs (SICP): Data Abstraction and Closure
Structure and Interpretation of Computer Programs (SICP): Data Abstraction and Closure
- Length
- 46 min
- Level
- Undergraduate
- Recorded
- MIT2009
Chapter 1 of 6: Before the lecture
Compilation lowers a Lisp program to register-machine code, where an interpreter instead raises the machine to the language. Session 18 of MIT 6.001 weighs the trade-off: interpreters keep source code and library structure for debugging, while compilers run faster. A zeroth-order compiler comes first, built by running the explicit control evaluator over code and stashing its register operations rather than executing them. Static analysis of which registers each sequence needs and modifies then removes irrelevant registers and redundant stack operations. Rules for appending code sequences while preserving registers follow, and student questions address primitive additions and multiple arguments in compiled code.

Your comment is kept while you sign up.Sign in
Turns the explicit control evaluator into a Lisp compiler, then prunes its redundant saves and restores.
Compilation lowers a Lisp program to register-machine code, where an interpreter instead raises the machine to the language. Session 18 of MIT 6.001 weighs the trade-off: interpreters keep source code and library structure for debugging, while compilers run faster. A zeroth-order compiler comes first, built by running the explicit control evaluator over code and stashing its register operations rather than executing them. Static analysis of which registers each sequence needs and modifies then removes irrelevant registers and redundant stack operations. Rules for appending code sequences while preserving registers follow, and student questions address primitive additions and multiple arguments in compiled code.
This lecture
Lecture 18 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.