Handbook
Glossary
check-set-slot ( val slot -- val offset )
Vocabulary
mirrors
Inputs
val
an
object
slot
an
object
Outputs
val
an
object
offset
an
object
Definition
USING:
accessors
classes
combinators
kernel
slots
;
IN:
mirrors
:
check-set-slot
( val slot -- val offset )
{
{
[
dup
not
]
[
no-such-slot
]
}
{
[
dup
read-only>>
]
[
read-only-slot
]
}
{
[
2dup
class>>
instance?
not
]
[
class>>
bad-slot-value
]
}
[
offset>>
]
}
cond
;
inline