Differences from Smalltalk
Our version of Smalltalk differs from the standard in a few ways:
- no class variables
- subclasses can see the fields of their parent classes; in ST-80 these are private
- we disallow globals. x:=expr will generate code for expr but not the store if x is not a valid argument, local variable, or field. Asking for the value of a global variable that is not defined, results in an error. The set of global names is readonly except class names.
- We allow forward refs (refs to classes not yet defined)
- no floats
- no ';' extended msg send notation
Architecture
There or two main components: the compiler and the interpreter (VM). The compiler reads in the file format, constructs an AST, walks the AST to define classes, and generates code in memory. (There is no bytecode file format like there is in Java.) The VM executes bytecodes thereby simulating the original Smalltalk program. The most complicated part involves method and block contexts for executing methods and code blocks.
Labels: