Buy GNU books!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
A non-immediate datatype is one which lives in the heap, either because
it cannot fit entirely within a
SCM word, or because it denotes a
specific storage location (in the nomenclature of the Revised^5 Report
SCM_NIMP macros will distinguish these
from immediates; see 1.2.3 Immediates vs Non-immediates.
Given a cell, Guile distinguishes between pairs and other non-immediate types by storing special tag values in a non-pair cell's car, that cannot appear in normal pairs. A cell with a non-tag value in its car is an ordinary pair. The type of a cell with a tag in its car depends on the tag; the non-immediate type predicates test this value. If a tag value appears elsewhere (in a vector, for example), the heap may become corrupted.
Note how the type information for a non-immediate object is split
SCM word and the cell that the
SCM word points
SCM word itself only indicates that the object is
non-immediate -- in other words stored in a heap cell. The tag stored
in the first word of the heap cell indicates more precisely the type of
The type predicates for non-immediate values work correctly on any
SCM value; you do not need to call
SCM_NIMP first, to
establish that a value is non-immediate.
18.104.22.168 Pairs 22.214.171.124 Vectors, Strings, and Symbols 126.96.36.199 Procedures 188.8.131.52 Closures 184.108.40.206 Subrs 220.127.116.11 Ports
|webmaster donations bookstore||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|