Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Previous: Conservative GC, Up: Data Representation [Contents][Index]
Guile classifies Scheme objects into two kinds: those that fit entirely
within an 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
information.
In fact, there are two basic C data types to represent objects in
Guile: SCM
and scm_t_bits
.
• Relationship between SCM and scm_t_bits: | ||
• Immediate objects: | ||
• Non-immediate objects: | ||
• Allocating Cells: | ||
• Heap Cell Type Information: | ||
• Accessing Cell Entries: |