bind
... "class" "selector" -- ... objects ``bind''
execute the method for selector
in class
.
<bind>
class selector-xt -- xt objects ``<bind>''
xt
is the method for the selector selector-xt
in
class
.
bind'
"class" "selector" -- xt objects ``bind'''
xt
is the method for selector
in class
.
[bind]
compile-time: "class" "selector" -- ; run-time: ... object -- ... objects ``[bind]''
compile the method for selector
in class
.
class
parent-class -- align offset objects ``class''
start a new class definition as a child of
parent-class
. align offset
are for use by
field
etc.
class->map
class -- map objects ``class->map''
map
is the pointer to class
's method map; it
points to the place in the map to which the selector offsets
refer (i.e., where object-map
s point to).
class-inst-size
class -- addr objects ``class-inst-size''
used as class-inst-size 2 ( class -- align size )
,
gives the size specification for an instance (i.e. an object)
of class
.
class-override!
xt sel-xt class-map -- objects ``class-override!''
xt
is the new method for the selector sel-xt
in
class-map
.
construct
... object -- objects ``construct''
initializes the data fields of object
. The method for the
class object
just does nothing ( object -- )
.
current'
"selector" -- xt objects ``current'''
xt
is the method for selector
in the current class.
[current]
compile-time: "selector" -- ; run-time: ... object -- ... objects ``[current]''
compile the method for selector
in the current class.
current-interface
-- addr objects ``current-interface''
this variable contains the class or interface currently being defined.
dict-new
... class -- object objects ``dict-new''
allot
and initialize an object of class class
in
the dictionary.
drop-order
class -- objects ``drop-order''
drops class
's wordlists from the search order. No
checking is made whether class
's wordlists are actually
on the search order.
end-class
align offset "name" -- objects ``end-class''
name
execution: -- class
ends a class definition. The resulting class is class
.
end-class-noname
align offset -- class objects ``end-class-noname''
ends a class definition. The resulting class is class
.
end-interface
"name" -- objects ``end-interface''
name
execution: -- interface
ends an interface definition. The resulting interface is
interface
.
end-interface-noname
-- interface objects ``end-interface-noname''
ends an interface definition. The resulting interface is
interface
.
exitm
-- objects ``exitm''
exit
from a method; restore old this
.
heap-new
... class -- object objects ``heap-new''
allocate
and initialize an object of class class
.
implementation
interface -- objects ``implementation''
the current class implements interface
. I.e., you can
use all selectors of the interface in the current class and its
descendents.
init-object
... class object -- objects ``init-object''
initializes a chunk of memory (object
) to an object of
class class
; then performs construct
.
inst-value
align1 offset1 "name" -- align2 offset2 objects ``inst-value''
name
execution: -- w
w
is the value of the field name
in this
object.
inst-var
align1 offset1 align size "name" -- align2 offset2 objects ``inst-var''
name
execution: -- addr
addr
is the address of the field name
in
this
object.
interface
-- objects ``interface''
starts an interface definition.
;m
colon-sys --; run-time: -- objects ``;m''
end a method definition; restore old this
.
m:
-- xt colon-sys; run-time: object -- objects ``m:''
start a method definition; object
becomes new this
.
method
xt "name" -- objects ``method''
name
execution: ... object -- ...
creates selector name
and makes xt
its method in
the current class.
object
-- class objects ``object''
the ancestor of all classes.
overrides
xt "selector" -- objects ``overrides''
replace default method for selector
in the current class
with xt
. overrides
must not be used during an
interface definition.
[parent]
compile-time: "selector" -- ; run-time: ... object -- ... objects ``[parent]''
compile the method for selector
in the parent of the
current class.
print
object -- objects ``print''
prints the object. The method for the class object
prints
the address of the object and the address of its class.
protected
-- objects ``protected''
set the compilation wordlist to the current class's wordlist
public
-- objects ``public''
restore the compilation wordlist that was in effect before the
last protected
that actually changed the compilation
wordlist.
push-order
class -- objects ``push-order''
add class
's wordlists to the search-order (in front)
selector
"name" -- objects ``selector''
name
execution: ... object -- ...
creates selector name
for the current class and its
descendents; you can set a method for the selector in the
current class with overrides
.
this
-- object objects ``this''
the receiving object of the current method (aka active object).
<to-inst>
w xt -- objects ``<to-inst>''
store w
into the field xt
in this
object.
[to-inst]
compile-time: "name" -- ; run-time: w -- objects ``[to-inst]''
store w
into field name
in this
object.
to-this
object -- objects ``to-this''
sets this
(used internally, but useful when debugging).
xt-new
... class xt -- object objects ``xt-new''
makes a new object, using xt ( align size -- addr )
to
get memory.
Go to the first, previous, next, last section, table of contents.