; Finale (with Hal) ; Last time: Interpretation (raising the machine to the level of Lisp) ; Today: Compilation (lowering Lisp to the machine language) ; Simulation vs. Translation ; Hal describes a way to call compiled objects from the interpreter ; by using the same conventions in the compiler as in the interpreter. ; Remove unnecessary operations required for simulation: ; 10A:(12m38s) => 10A:(15m44s) ; 10A:(17m26s) More compiler-optimizations. ; 10A:(18m39s) Elimination of Redundancies: 3 operations remain. ; QUESTIONS 10A:(25m32s) BREAK ; (OP A1 A2) ; -> compiler tasks: ; {compile OP ; result in FUN} -> MUST PRESERVE ENV ; ; {compile A1 ; result in VAL} -> MUST PRESERVE ENV ; (assign argl (cons (fetch val) '())) ; ; {compile A2 ; result in VAL} -> MUST PRESERVE ARGL ; (assign argl (cons (fetch val) (fetch argl))) ; ...... ; 10A:(32m44s) The task of a compiler is to append code-sequences, ; preserving register-values by observing the requirements of ; its input-procedures and saving the needed ones (for later) ; that would be modified by other procedures. ; 10A:(37m27s) Hal summarizes the requirements to make this possible. ; (END)