| types definitions |
types definitions |
| |
|
| : static ( -- ) \ oof- oof |
: static ( -- ) \ oof- oof |
| \G Create a class-wide cell sized variable |
\G Create a class-wide cell-sized variable. |
| mallot Create , #static , |
mallot Create , #static , |
| DOES> @ o@ + ; |
DOES> @ o@ + ; |
| : method ( -- ) \ oof- oof |
: method ( -- ) \ oof- oof |
| \G Create a method selector |
\G Create a method selector. |
| mallot Create , #method , |
mallot Create , #method , |
| DOES> @ o@ + @ execute ; |
DOES> @ o@ + @ execute ; |
| : early ( -- ) \ oof- oof |
: early ( -- ) \ oof- oof |
| \G Create a method selector for early binding |
\G Create a method selector for early binding. |
| Create ['] crash , #early , |
Create ['] crash , #early , |
| DOES> @ execute ; |
DOES> @ execute ; |
| : var ( size -- ) \ oof- oof |
: var ( size -- ) \ oof- oof |
| \G Create an instance pointer |
\G Create an instance pointer |
| Create immediate lastob @ here lastob ! instptr, ; |
Create immediate lastob @ here lastob ! instptr, ; |
| : asptr ( class -- ) \ oof- oof |
: asptr ( class -- ) \ oof- oof |
| \G Create an alias to an instance pointer, casted to another class |
\G Create an alias to an instance pointer, cast to another class. |
| cell+ @ Create immediate |
cell+ @ Create immediate |
| lastob @ here lastob ! , , instptr> ; |
lastob @ here lastob ! , , instptr> ; |
| |
|