1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

* deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,

SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c.  Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
This commit is contained in:
Marius Vollmer 2004-07-23 15:43:02 +00:00
parent 928e0f4210
commit e11e83f3d9
59 changed files with 840 additions and 1172 deletions

View file

@ -234,18 +234,25 @@ SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
SCM
scm_mcache_lookup_cmethod (SCM cache, SCM args)
{
long i, n, end, mask;
unsigned long i, mask, n, end;
SCM ls, methods, z = SCM_CDDR (cache);
n = SCM_INUM (SCM_CAR (z)); /* maximum number of specializers */
n = scm_to_ulong (SCM_CAR (z)); /* maximum number of specializers */
methods = SCM_CADR (z);
if (SCM_INUMP (methods))
if (SCM_VECTORP (methods))
{
/* cache format #1: prepare for linear search */
mask = -1;
i = 0;
end = SCM_VECTOR_LENGTH (methods);
}
else
{
/* cache format #2: compute a hash value */
long hashset = SCM_INUM (methods);
unsigned long hashset = scm_to_ulong (methods);
long j = n;
z = SCM_CDDR (z);
mask = SCM_INUM (SCM_CAR (z));
mask = scm_to_ulong (SCM_CAR (z));
methods = SCM_CADR (z);
i = 0;
ls = args;
@ -260,13 +267,6 @@ scm_mcache_lookup_cmethod (SCM cache, SCM args)
i &= mask;
end = i;
}
else /* SCM_VECTORP (methods) */
{
/* cache format #1: prepare for linear search */
mask = -1;
i = 0;
end = SCM_VECTOR_LENGTH (methods);
}
/* Search for match */
do