mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Distinguish #f and ().
* __scm.h: #undef SICP. * pairs.h (SCM_EOL): Delete this definition, equating it with SCM_BOOL_F. * tags.h (SCM_EOL): Give it a new definition here; I think I found the value it used to have. Doc fixes, too.
This commit is contained in:
parent
ee81f9ca7b
commit
3c205827ce
3 changed files with 20 additions and 18 deletions
|
@ -95,12 +95,15 @@
|
|||
|
||||
/* {Unsupported Options}
|
||||
*
|
||||
* These must be defined.
|
||||
* These must be defined as given here.
|
||||
*/
|
||||
|
||||
|
||||
#define CCLO
|
||||
#define SICP
|
||||
|
||||
/* Guile Scheme supports the #f/() distinction; Guile Lisp won't. We
|
||||
have horrible plans for their unification. */
|
||||
#undef SICP
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@ typedef SCM huge *SCMPTR;
|
|||
#define SCM_PTR_LE(x, y) (!SCM_PTR_GT(x, y))
|
||||
#define SCM_PTR_GE(x, y) (!SCM_PTR_LT(x, y))
|
||||
|
||||
#define SCM_EOL SCM_BOOL_F
|
||||
#define SCM_NULLP(x) (SCM_EOL == (x))
|
||||
#define SCM_NNULLP(x) (SCM_EOL != (x))
|
||||
|
||||
|
|
|
@ -80,27 +80,27 @@ typedef long SCM;
|
|||
*
|
||||
* Immediates -- meaning that the variable contains an entire Scheme object.
|
||||
*
|
||||
* Non-immediates -- meaning that the variable holds a (possibly tagged) pointer
|
||||
* into the cons pair heap.
|
||||
* Non-immediates -- meaning that the variable holds a (possibly
|
||||
* tagged) pointer into the cons pair heap.
|
||||
*
|
||||
* Non-objects are distinguished from other values by careful coding only (i.e.,
|
||||
* programmers must keep track of any SCM variables they create that don't contain
|
||||
* ordinary scheme values).
|
||||
* Non-objects are distinguished from other values by careful coding
|
||||
* only (i.e., programmers must keep track of any SCM variables they
|
||||
* create that don't contain ordinary scheme values).
|
||||
*
|
||||
* All immediates and non-immediates must have a 0 in bit 0. Only non-object
|
||||
* values can have a 1 in bit 0. In some cases, bit 0 of a word in the heap
|
||||
* is used for the GC tag so during garbage collection, that bit might be 1
|
||||
* even in an immediate or non-immediate value. In other cases, bit 0 of a word
|
||||
* in the heap is used to tag a pointer to a GLOC (VM global variable address)
|
||||
* or the header of a struct. But whenever an SCM variable holds a normal Scheme
|
||||
* value, bit 0 is 0.
|
||||
* All immediates and non-immediates must have a 0 in bit 0. Only
|
||||
* non-object values can have a 1 in bit 0. In some cases, bit 0 of a
|
||||
* word in the heap is used for the GC tag so during garbage
|
||||
* collection, that bit might be 1 even in an immediate or
|
||||
* non-immediate value. In other cases, bit 0 of a word in the heap
|
||||
* is used to tag a pointer to a GLOC (VM global variable address) or
|
||||
* the header of a struct. But whenever an SCM variable holds a
|
||||
* normal Scheme value, bit 0 is 0.
|
||||
*
|
||||
* Immediates and non-immediates are distinguished by bits two and four.
|
||||
* Immediate values must have a 1 in at least one of those bits. Does
|
||||
* this (or any other detail of tagging) seem arbitrary? Try changing it!
|
||||
* (Not always impossible but it is fair to say that many details of tags
|
||||
* are mutually dependent).
|
||||
*/
|
||||
* are mutually dependent). */
|
||||
|
||||
#define SCM_IMP(x) (6 & (int)(x))
|
||||
#define SCM_NIMP(x) (!SCM_IMP(x))
|
||||
|
@ -464,7 +464,7 @@ enum scm_tags
|
|||
#define SCM_BOOL_T SCM_MAKIFLAG(17)
|
||||
#define SCM_UNDEFINED SCM_MAKIFLAG(18)
|
||||
#define SCM_EOF_VAL SCM_MAKIFLAG(19)
|
||||
#define SCM_UNUSED_NIL_VALUE SCM_MAKIFLAG(20)
|
||||
#define SCM_EOL SCM_MAKIFLAG(20)
|
||||
#define SCM_UNSPECIFIED SCM_MAKIFLAG(21)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue