1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 23:20:38 +02:00

* eval.c (scm_unmemocar): Use macros to test for gloc cell.

* eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):  Added missing
  call to SCM_UNPACK.
This commit is contained in:
Dirk Herrmann 2000-04-17 15:05:20 +00:00
parent 2891588bee
commit b0c545678a
4 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,11 @@
2000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (scm_unmemocar): Use macros to test for gloc cell.
Minimize scope of variable 'ir'.
* eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):
Added missing call to SCM_UNPACK.
2000-04-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* validate.h (SCM_VALIDATE_INUM_RANGE_COPY,

View file

@ -405,20 +405,19 @@ scm_lookupcar (SCM vloc, SCM genv, int check)
SCM
scm_unmemocar (SCM form, SCM env)
{
#ifdef DEBUG_EXTENSIONS
register int ir;
#endif
SCM c;
if (SCM_IMP (form))
return form;
c = SCM_CAR (form);
if (1 == (SCM_UNPACK (c) & 7))
if (SCM_ITAG3 (c) == scm_tc3_cons_gloc)
SCM_SETCAR (form, SCM_GLOC_SYM (c));
#ifdef MEMOIZE_LOCALS
#ifdef DEBUG_EXTENSIONS
else if (SCM_ILOCP (c))
{
int ir;
for (ir = SCM_IFRAME (c); ir != 0; --ir)
env = SCM_CDR (env);
env = SCM_CAR (SCM_CAR (env));

View file

@ -81,9 +81,10 @@ extern SCM scm_eval_options_interface (SCM setting);
#define SCM_ICDR (0x00080000L)
#define SCM_IFRINC (0x00000100L)
#define SCM_IDSTMSK (-SCM_IDINC)
#define SCM_IFRAME(n) ((int)((SCM_ICDR-SCM_IFRINC)>>8) & ((int)(n)>>8))
#define SCM_IDIST(n) (((unsigned long)(n))>>20)
#define SCM_ICDRP(n) (SCM_ICDR & SCM_UNPACK(n))
#define SCM_IFRAME(n) ((int)((SCM_ICDR-SCM_IFRINC)>>8) \
& (SCM_UNPACK (n) >> 8))
#define SCM_IDIST(n) (SCM_UNPACK (n) >> 20)
#define SCM_ICDRP(n) (SCM_ICDR & SCM_UNPACK (n))

View file

@ -56,7 +56,7 @@
#define SCM_IS_WHVEC(X) (SCM_UNPACK (SCM_VELTS(X)[-1]) == 1)
#define SCM_IS_WHVEC_V(X) (SCM_UNPACK (SCM_VELTS(X)[-1]) == 2)
#define SCM_IS_WHVEC_B(X) (SCM_UNPACK (SCM_VELTS(X)[-1]) == 3)
#define SCM_IS_WHVEC_ANY(X) (SCM_VELTS(X)[-1])
#define SCM_IS_WHVEC_ANY(X) (SCM_UNPACK (SCM_VELTS(X)[-1]) != 0)
#define SCM_WVECT_GC_CHAIN(X) (SCM_VELTS(X)[-2])