mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
* eval.c: Eliminated redundant SCM_IMP tests.
* hashtab.c, weaks.c: Fixed critical sections. Thanks to Keisuke Nishida.
This commit is contained in:
parent
9a00c9fc85
commit
44d3cb0d1b
4 changed files with 24 additions and 18 deletions
|
@ -1,3 +1,13 @@
|
|||
2000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* eval.c (scm_m_body, scm_macroexp, unmemocopy, scm_eval_args,
|
||||
scm_deval_args): Eliminated redundant SCM_IMP tests.
|
||||
|
||||
* hashtab.c (scm_ihashx, scm_sloppy_assx, scm_delx_x), weaks.c
|
||||
(scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
|
||||
scm_make_doubly_weak_hash_table): Fixed critical sections.
|
||||
Thanks to Keisuke Nishida.
|
||||
|
||||
2000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest):
|
||||
|
|
|
@ -494,7 +494,7 @@ scm_m_body (SCM op, SCM xorig, const char *what)
|
|||
return xorig;
|
||||
|
||||
/* Retain possible doc string. */
|
||||
if (SCM_IMP (SCM_CAR(xorig)) || SCM_NCONSP (SCM_CAR (xorig)))
|
||||
if (!SCM_CONSP (SCM_CAR (xorig)))
|
||||
{
|
||||
if (SCM_NNULLP (SCM_CDR(xorig)))
|
||||
return scm_cons (SCM_CAR (xorig),
|
||||
|
@ -1241,7 +1241,7 @@ scm_macroexp (SCM x, SCM env)
|
|||
eventually execute the code for real. */
|
||||
|
||||
macro_tail:
|
||||
if (SCM_IMP (SCM_CAR (x)) || !SCM_SYMBOLP (SCM_CAR (x)))
|
||||
if (!SCM_SYMBOLP (SCM_CAR (x)))
|
||||
return x;
|
||||
|
||||
#ifdef USE_THREADS
|
||||
|
@ -1473,7 +1473,7 @@ unmemocopy (SCM x, SCM env)
|
|||
loop:
|
||||
while (SCM_CELLP (x = SCM_CDR (x)) && SCM_ECONSP (x))
|
||||
{
|
||||
if (SCM_IMP (SCM_CAR (x)) && SCM_ISYMP (SCM_CAR (x)))
|
||||
if (SCM_ISYMP (SCM_CAR (x)))
|
||||
/* skip body markers */
|
||||
continue;
|
||||
SCM_SETCDR (z, unmemocar (scm_cons (unmemocopy (SCM_CAR (x), env),
|
||||
|
@ -1528,9 +1528,7 @@ scm_eval_args (SCM l, SCM env, SCM proc)
|
|||
while (SCM_NIMP (l))
|
||||
{
|
||||
#ifdef SCM_CAUTIOUS
|
||||
if (SCM_IMP (l))
|
||||
goto wrongnumargs;
|
||||
else if (SCM_CONSP (l))
|
||||
if (SCM_CONSP (l))
|
||||
{
|
||||
if (SCM_IMP (SCM_CAR (l)))
|
||||
res = SCM_EVALIM (SCM_CAR (l), env);
|
||||
|
@ -1750,9 +1748,7 @@ scm_deval_args (SCM l, SCM env, SCM proc, SCM *lloc)
|
|||
while (SCM_NIMP (l))
|
||||
{
|
||||
#ifdef SCM_CAUTIOUS
|
||||
if (SCM_IMP (l))
|
||||
goto wrongnumargs;
|
||||
else if (SCM_CONSP (l))
|
||||
if (SCM_CONSP (l))
|
||||
{
|
||||
if (SCM_IMP (SCM_CAR (l)))
|
||||
res = SCM_EVALIM (SCM_CAR (l), env);
|
||||
|
|
|
@ -380,11 +380,11 @@ static unsigned int
|
|||
scm_ihashx (SCM obj,unsigned int n,struct scm_ihashx_closure * closure)
|
||||
{
|
||||
SCM answer;
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->hash,
|
||||
scm_listify (obj, scm_ulong2num ((unsigned long)n), SCM_UNDEFINED),
|
||||
SCM_EOL);
|
||||
SCM_DEFER_INTS;
|
||||
SCM_ALLOW_INTS;
|
||||
return SCM_INUM (answer);
|
||||
}
|
||||
|
||||
|
@ -394,11 +394,11 @@ static SCM
|
|||
scm_sloppy_assx (SCM obj,SCM alist,struct scm_ihashx_closure * closure)
|
||||
{
|
||||
SCM answer;
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->assoc,
|
||||
scm_listify (obj, alist, SCM_UNDEFINED),
|
||||
SCM_EOL);
|
||||
SCM_DEFER_INTS;
|
||||
SCM_ALLOW_INTS;
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
@ -409,11 +409,11 @@ static SCM
|
|||
scm_delx_x (SCM obj,SCM alist,struct scm_ihashx_closure * closure)
|
||||
{
|
||||
SCM answer;
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->delete,
|
||||
scm_listify (obj, alist, SCM_UNDEFINED),
|
||||
SCM_EOL);
|
||||
SCM_DEFER_INTS;
|
||||
SCM_ALLOW_INTS;
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ SCM_DEFINE (scm_make_weak_key_hash_table, "make-weak-key-hash-table", 1, 0, 0,
|
|||
SCM v;
|
||||
SCM_VALIDATE_INUM (1,k);
|
||||
v = scm_make_weak_vector (k, SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
SCM_UNPACK (SCM_VELTS (v)[-1]) = 1;
|
||||
SCM_ALLOW_INTS;
|
||||
return v;
|
||||
|
@ -149,7 +149,7 @@ SCM_DEFINE (scm_make_weak_value_hash_table, "make-weak-value-hash-table", 1, 0,
|
|||
SCM v;
|
||||
SCM_VALIDATE_INUM (1,k);
|
||||
v = scm_make_weak_vector (k, SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
SCM_UNPACK (SCM_VELTS (v)[-1]) = 2;
|
||||
SCM_ALLOW_INTS;
|
||||
return v;
|
||||
|
@ -166,7 +166,7 @@ SCM_DEFINE (scm_make_doubly_weak_hash_table, "make-doubly-weak-hash-table", 1, 0
|
|||
SCM v;
|
||||
SCM_VALIDATE_INUM (1,k);
|
||||
v = scm_make_weak_vector (k, SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
SCM_DEFER_INTS;
|
||||
SCM_UNPACK (SCM_VELTS (v)[-1]) = 3;
|
||||
SCM_ALLOW_INTS;
|
||||
return v;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue