Next: objects symbols ops, Up: objects symbols [Index]
value
and proc
slotsThe value
field has multiple purposes:
value
field holds a reference to the data struct–type
descriptor.
value
field holds a reference to the record–type descriptor.
eval
, have their current value
stored in the value
slot of symbols, or, more precisely, of
gensyms; such symbols are called location gensyms or loc
gensyms.
eval
, have a label gensym
associated to them: a symbol whose value
slot holds a reference
to the syntactic binding descriptor to be used by the expander.
About the proc
slot: when a top level binding is never assigned
(in other words: it is immutable) and its value is a closure object, the
associated loc gensym holds its value in both the value
slot and
the proc
slot. Whenever binary code in a code object performs a
call to a non–assigned top level closure object, it does the following:
proc
slot, which is
meant to be a reference to the closure object. This is done by
accessing the gensym object with a low–level assembly instruction,
not necessarily by using the primitive operation
$symbol-proc
.
Values stored in the value
slot of loc gensyms can be closure
objects or not; they can be called by binary code, but they need to be
validated as closure objects first. Values stored in the proc
slot can only be references to closure objects and they can be called by
binary code without being first validated.
All the primitive functions implemented by code in Vicare’s
boot image are accessible from libraries defined by the boot image; such
primitive functions have a loc gensym associated to them, in which both
the value
and proc
slots hold a reference to the actual
closure object. The bindings of primitive functions are immutable.
All the top level bindings defined by a library
form have a loc
gensym associated to them:
value
and proc
slots
of its loc gensym hold a reference to the actual closure object.
value
slot of its loc gensym; the proc
slot
of the loc gensym is set to the unbound object.
value
slot of its loc gensym; the proc
slot of the loc
gensym is set to the unbound object.
Next: objects symbols ops, Up: objects symbols [Index]