Cells represent all SCM objects other than immediates. A cell has
CAR and a
CDR. Low-order bits in
the type of object. The rest of
CDR hold object
data. The number after
tc specifies how many bits are in the
type code. For instance,
tc7 indicates that the type code is 7
Allocates a new cell and stores a pointer to it in
SCMlocal variable x.
Care needs to be taken that stores into the new cell pointed to by x do not create an inconsistent object. See Signals.
All of the C macros decribed in this section assume that their argument
is of type
SCM and points to a cell (
scheme cons-cell returned by (cons arg1 arg2).
applicable object returned by (lambda (args) ...).
tc3_closures have a pointer to the body of the procedure in the
CARand a pointer to the environment in the
CDR. Bits 1 and 2 (zero-based) in the
CDRindicate a lower bound on the number of required arguments to the closure, which is used to avoid allocating rest argument lists in the environment cache. This encoding precludes an immediate value for the
CDR: In the case of an empty environment all bits above 2 in the