Original JavaScript
Original JavaScript
Original JavaScript

[1] This is not true if we allow internal definitions, unless we scan them out. See exercise 5.47.
[2] This is the modification to variable lookup required if we implement the scanning method to eliminate internal definitions (exercise 5.47). We will need to eliminate these definitions in order for lexical addressing to work.
[3] Lexical addresses cannot be used to access variables in the global environment, because these names can be defined and redefined interactively at any time. With internal definitions scanned out, as in exercise 5.47, the only definitions the compiler sees are those at top level, which act on the global environment. Compilation of a definition does not cause the defined name to be entered in the compile-time environment.
5.5.6   Lexical Addressing