December 2009
Intermediate to advanced
380 pages
9h 2m
English
High-level interpreters store values according to variable names, not memory addresses (like low-level interpreters and CPUs do). That means we’ve got to represent memory with a dictionary mapping names to values.
There are three kinds of memory spaces to worry about for most programming languages: global memory, function spaces (for parameters and locals), and data aggregate instances (structs or objects). For simplicity, we can normalize all these spaces by treating them as dictionaries. Even fields are really just variables stored within an instance’s memory space. To store a value into a space, we map a name to that value. A memory space is the run-time analog of a scope from static analysis. ...
Read now
Unlock full access