Mini-OOF2 is very similar to Mini-OOF in many respects, but differs
significantly in a few aspects. In particular, Mini-OOF2 has a current
object variable, and uses the primitives >o
and o>
to
manipulate that object stack. All method invocations and instance
variable accesses refer to the current object.
Set the current object to c_addr, the previous current object is pushed to the return stack
Restore the previous current object from the return stack
To ease passing an object pointer to method invocation or instance
variable accesses, the additional recognizer rec-moof2
is
activated.
Very simplistic dot-parser, transforms .
selector/ivar to
>o
selector/ivar o>
.
To assign methods to selectors, use xt class is
selector, so no defines
necessary. For early binding of
methods, [
class ] defers
selector is used, no
need for ::
. Instead of writing :noname
code
;
class is
selector, you can also use the
syntactic sugar class :method
selector code ;
.
define a noname that is assigned to the deffered word name
in class at ;
.