Where to Go from Here
In this chapter, we had to completely ignore garbage collection, executing code from more than one source file (linking), classes, libraries, and debuggers. But, we’d need all of that to build an interpreter for a general-purpose programming language. The best way to figure out how all that works is to dig into the source for an existing interpreter. Interpreter source code is available for just about every common language, both dynamically typed and statically typed. You can also read the literature on the Smalltalk and Self interpreters as well as garbage collection and dynamic method dispatch. A good paper to read on register-based bytecode machines is The Implementation of Lua 5.0 [IdC05].
One of the things you’ll discover ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access