From 013392e6a069912adca367598e9bdc6e44fc0118 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 27 Mar 2010 11:46:30 -0400 Subject: [PATCH] Renumber IFLAGSs so the first 8 are reserved for lisp booleans. This enables more efficient implementations of several operations, e.g. scm_is_lisp_bool, canonicalize_boolean, fast_boolean_not, converting SCM booleans to C booleans, etc. * libguile/tags.h: Renumber IFLAGs. * libguile/print.c: Renumber iflagnames to match. --- libguile/print.c | 4 +++- libguile/tags.h | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libguile/print.c b/libguile/print.c index 8867e6b..ca38d42 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -68,7 +68,9 @@ static const char *iflagnames[] = "#", "()", "#t", - "#", + "#", + "#", + "#", "#", "#", "#", diff --git a/libguile/tags.h b/libguile/tags.h index 2e6dea2..dd9875e 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -519,12 +519,14 @@ enum scm_tc8_tags #define SCM_BOOL_T SCM_MAKIFLAG (4) #ifdef BUILDING_LIBGUILE -#define SCM_XXX_ANOTHER_BOOLEAN_DONT_USE SCM_MAKIFLAG (5) +#define SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0 SCM_MAKIFLAG (5) +#define SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_1 SCM_MAKIFLAG (6) +#define SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_2 SCM_MAKIFLAG (7) #endif -#define SCM_UNSPECIFIED SCM_MAKIFLAG (6) -#define SCM_UNDEFINED SCM_MAKIFLAG (7) -#define SCM_EOF_VAL SCM_MAKIFLAG (8) +#define SCM_UNSPECIFIED SCM_MAKIFLAG (8) +#define SCM_UNDEFINED SCM_MAKIFLAG (9) +#define SCM_EOF_VAL SCM_MAKIFLAG (10) /* When a variable is unbound this is marked by the SCM_UNDEFINED * value. The following is an unbound value which can be handled on @@ -534,7 +536,7 @@ enum scm_tc8_tags * the code which handles this value in C so that SCM_UNDEFINED can be * used instead. It is not ideal to let this kind of unique and * strange values loose on the Scheme level. */ -#define SCM_UNBOUND SCM_MAKIFLAG (9) +#define SCM_UNBOUND SCM_MAKIFLAG (11) #define SCM_UNBNDP(x) (scm_is_eq ((x), SCM_UNDEFINED)) -- 1.5.6.5