内容 5.5 Compilation · 468
练习 自检推理
Exercise 5.43: We argued in 4.1.6
that internal definitions for block structure should not be considered “real”
defines. Rather, a procedure body should be interpreted as if the
internal variables being defined were installed as ordinary lambda
variables initialized to their correct values using set!.
4.1.6 and Exercise 4.16 showed how to modify the metacircular
interpreter to accomplish this by scanning out internal definitions. Modify
the compiler to perform the same transformation before it compiles a procedure
body.
练习 5.43:我们在 4.1.6 节中指出,用于块结构的内部定义不应被视为"真正的" define。过程体应被解释为:将内部定义的变量作为普通 lambda 变量安装,并用 set! 将其初始化为正确的值。4.1.6 节和练习 4.16 展示了如何修改元循环解释器,通过扫描出内部定义来实现这一转换。修改编译器,使其在编译过程体之前执行同样的转换。
我的笔记 自动保存