diff --git a/RELEASE b/RELEASE index eb6db9c39..551af20e3 100644 --- a/RELEASE +++ b/RELEASE @@ -33,6 +33,7 @@ In release 1.5: - remove deprecated types, functions and macros from numbers.h: scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL, SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG +- remove deprecated macro from tags.h: SCM_DOUBLE_CELLP In release 1.6: - remove deprecated variables: diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 43169668b..2c3e14a1e 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2001-02-03 Michael Livshin + + * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of + the deprecated SCM_DOUBLE_CELLP. + + * tags.h (SCM_DOUBLE_CELLP): deprecated. + 2001-02-02 Keisuke Nishida * dump.c, dump.h: New files. diff --git a/libguile/gc.c b/libguile/gc.c index 0057ed372..052859210 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -65,6 +65,7 @@ #include "libguile/vectors.h" #include "libguile/weaks.h" #include "libguile/hashtab.h" +#include "libguile/tags.h" #include "libguile/validate.h" #include "libguile/gc.h" @@ -252,6 +253,8 @@ int scm_default_max_segment_size = 2097000L;/* a little less (adm) than 2 Mb */ # endif /* UNICOS */ #endif /* PROT386 */ +#define DOUBLECELL_ALIGNED_P(x) (((2 * sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0) + #define ALIGNMENT_SLACK(freelist) (SCM_GC_CARD_SIZE - 1) #define CLUSTER_SIZE_IN_BYTES(freelist) \ (((freelist)->cluster_size / (SCM_GC_CARD_N_DATA_CELLS / (freelist)->span)) * SCM_GC_CARD_SIZE) @@ -1461,7 +1464,7 @@ scm_mark_locations (SCM_STACKITEM x[], scm_sizet n) break; if (scm_heap_table[seg_id].span == 1 - || SCM_DOUBLE_CELLP (obj)) + || DOUBLECELL_ALIGNED_P (obj)) scm_gc_mark (obj); break; @@ -1495,7 +1498,7 @@ scm_cellp (SCM value) if (SCM_PTR_LE (scm_heap_table[i].bounds[0], ptr) && SCM_PTR_GT (scm_heap_table[i].bounds[1], ptr) - && (scm_heap_table[i].span == 1 || SCM_DOUBLE_CELLP (value)) + && (scm_heap_table[i].span == 1 || DOUBLECELL_ALIGNED_P (value)) && !SCM_GC_IN_CARD_HEADERP (ptr) ) return 1; diff --git a/libguile/tags.h b/libguile/tags.h index 02ddeec9e..f69031d81 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -293,7 +293,9 @@ typedef long scm_bits_t; #define SCM_CELLP(x) (((sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0) #define SCM_NCELLP(x) (!SCM_CELLP (x)) +#if (SCM_DEBUG_DEPRECATED == 0) #define SCM_DOUBLE_CELLP(x) (((2 * sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0) +#endif /* SCM_DEBUG_DEPRECATED == 0 */ /* See numbers.h for macros relating to immediate integers. */