Guile classifies Scheme objects into two kinds: those that fit entirely
SCM, and those that require heap storage.
The former class are called immediates. The class of immediates includes small integers, characters, boolean values, the empty list, the mysterious end-of-file object, and some others.
The remaining types are called, not surprisingly, non-immediates.
They include pairs, procedures, strings, vectors, and all other data
types in Guile. For non-immediates, the
SCM word contains a
pointer to data on the heap, with further information about the object
in question is stored in that data.
This section describes how the
SCM type is actually represented
and used at the C level. Interested readers should see
libguile/tags.h for an exposition of how Guile stores type
In fact, there are two basic C data types to represent objects in
|• Relationship between SCM and scm_t_bits:|
|• Immediate objects:|
|• Non-immediate objects:|
|• Allocating Cells:|
|• Heap Cell Type Information:|
|• Accessing Cell Entries:|