| \ : to-this ( object -- ) |
\ : to-this ( object -- ) |
| \ thisp ! ; |
\ thisp ! ; |
| |
|
| : m: ( -- xt colon-sys; run-time: object -- ) \ objects- objects |
: enterm ( -- ; run-time: object -- ) |
| \g Start a method definition; @var{object} becomes new @code{this}. |
\g method prologue; @var{object} becomes new @code{this}. |
| :noname |
|
| POSTPONE this |
POSTPONE this |
| POSTPONE >r |
POSTPONE >r |
| POSTPONE to-this ; |
POSTPONE to-this ; |
| |
|
| |
: m: ( -- xt colon-sys; run-time: object -- ) \ objects- objects |
| |
\g Start a method definition; @var{object} becomes new @code{this}. |
| |
:noname enterm ; |
| |
|
| |
: :m ( "name" -- xt; run-time: object -- ) \ objects- objects |
| |
\g Start a named method definition; @var{object} becomes new |
| |
\g @code{this}. Has to be ended with @code{;m}. |
| |
: enterm ; |
| |
|
| : exitm ( -- ) \ objects- objects |
: exitm ( -- ) \ objects- objects |
| \g @code{exit} from a method; restore old @code{this}. |
\g @code{exit} from a method; restore old @code{this}. |
| POSTPONE r> |
POSTPONE r> |