mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
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.
This commit is contained in:
parent
cd56b18192
commit
e17d318faa
4 changed files with 139 additions and 92 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue