summaryrefslogtreecommitdiff
path: root/libguile/objects.c
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2003-09-16 17:37:56 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2003-09-16 17:37:56 +0000
commite17d318faaf4f9674e81b9ee883707b0a57a83af (patch)
tree847c02a5cc0b946bbcb0ef30efb34a4cbf04542a /libguile/objects.c
parentcd56b181925ce3b46fda87eefc69eb34316c6845 (diff)
downloadguile-e17d318faaf4f9674e81b9ee883707b0a57a83af.tar.gz
This set of patches eliminates the dependency between the
implementation of evaluator specific memoization codes and special constants like #f, '() etc. ('flags'), which are not evaluator specific. The goal is to remove definitions of evaluator memoization codes completely from the public interface. This will make it possible to experiment more freely with optimizations of guile's internal representation of memoized code. * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM. * print.c (iflagnames): New array, holding the printed names of guile's special constants ('flags'). (scm_isymnames): Now holds only the printed names of the memoization codes. (scm_iprin1): Separate the handling of memoization codes and guile's special constants. * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA, SCM_IFLAGNUM): new (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T, SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND, SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE, SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed values. (SCM_IFLAGP): SCM_IFLAGP now only tests for flags. (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the tc9 macros and scm_tc9_flag.
Diffstat (limited to 'libguile/objects.c')
-rw-r--r--libguile/objects.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/libguile/objects.c b/libguile/objects.c
index 0f4443cd8..be9481c9a 100644
--- a/libguile/objects.c
+++ b/libguile/objects.c
@@ -71,19 +71,12 @@ SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
case scm_tc3_imm24:
if (SCM_CHARP (x))
return scm_class_char;
+ else if (SCM_BOOLP (x))
+ return scm_class_boolean;
+ else if (SCM_NULLP (x))
+ return scm_class_null;
else
- {
- switch (SCM_ISYMNUM (x))
- {
- case SCM_ISYMNUM (SCM_BOOL_F):
- case SCM_ISYMNUM (SCM_BOOL_T):
- return scm_class_boolean;
- case SCM_ISYMNUM (SCM_EOL):
- return scm_class_null;
- default:
- return scm_class_unknown;
- }
- }
+ return scm_class_unknown;
case scm_tc3_cons:
switch (SCM_TYP7 (x))