diff --git a/libguile/ChangeLog b/libguile/ChangeLog index d7f579edc..c9d7e3834 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,11 @@ +2000-05-23 Dirk Herrmann + + * strings.h (SCM_NSTRINGP, SCM_NRWSTRINGP), tags.h + (SCM_NDOUBLE_CELLP), vectors.h (SCM_NVECTORP): Deprecated. + + * gc.c (scm_igc), gc.h (SCM_PTR_MASK, SCM_PTR_LT): Removed #ifdef + nosve #endif conditionally compiled code. + 2000-05-23 Michael Livshin * gc.c (scm_heap_seg_data_t): fixed comment for the `span' member. diff --git a/libguile/gc.c b/libguile/gc.c index cf463fae2..a60435d63 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -860,22 +860,11 @@ scm_igc (const char *what) / sizeof (SCM_STACKITEM))); { - /* stack_len is long rather than scm_sizet in order to guarantee that - &stack_len is long aligned */ + scm_sizet stack_len = scm_stack_size (scm_stack_base); #ifdef SCM_STACK_GROWS_UP -#ifdef nosve - long stack_len = (SCM_STACKITEM *) (&stack_len) - scm_stack_base; + scm_mark_locations (scm_stack_base, stack_len); #else - long stack_len = scm_stack_size (scm_stack_base); -#endif - scm_mark_locations (scm_stack_base, (scm_sizet) stack_len); -#else -#ifdef nosve - long stack_len = scm_stack_base - (SCM_STACKITEM *) (&stack_len); -#else - long stack_len = scm_stack_size (scm_stack_base); -#endif - scm_mark_locations ((scm_stack_base - stack_len), (scm_sizet) stack_len); + scm_mark_locations (scm_stack_base - stack_len, stack_len); #endif } diff --git a/libguile/gc.h b/libguile/gc.h index 03084f743..3b0706686 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -137,18 +137,11 @@ typedef scm_cell * SCM_CELLPTR; #define SCM_CDRLOC(x) (&SCM_CDR (x)) -/* SCM_PTR_LT defines how to compare two SCM_CELLPTRs (which may not be in the - * same scm_array). +/* SCM_PTR_LT and friends define how to compare two SCM_CELLPTRs (which may + * point to cells in different heap segments). */ - -#ifdef nosve - #define SCM_PTR_MASK 0xffffffffffff - #define SCM_PTR_LT(x, y) (((int) (x) & SCM_PTR_MASK) < ((int) (y) & SCM_PTR_MASK)) -#else - #define SCM_PTR_LT(x, y) ((x) < (y)) -#endif /* def nosve */ - -#define SCM_PTR_GT(x, y) SCM_PTR_LT (y, x) +#define SCM_PTR_LT(x, y) ((x) < (y)) +#define SCM_PTR_GT(x, y) (SCM_PTR_LT (y, x)) #define SCM_PTR_LE(x, y) (!SCM_PTR_GT (x, y)) #define SCM_PTR_GE(x, y) (!SCM_PTR_LT (x, y)) diff --git a/libguile/strings.h b/libguile/strings.h index c4289da82..f9a77a121 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -51,17 +51,14 @@ -#define SCM_SLOPPY_STRINGP(x) (SCM_TYP7S(x)==scm_tc7_string) -#define SCM_STRINGP(x) (SCM_NIMP(x) && SCM_SLOPPY_STRINGP(x)) -#define SCM_NSTRINGP(x) (!SCM_STRINGP(x)) +#define SCM_SLOPPY_STRINGP(x) (SCM_TYP7S (x) == scm_tc7_string) +#define SCM_STRINGP(x) (SCM_NIMP (x) && SCM_SLOPPY_STRINGP (x)) /* Is X a writable string (i.e., not a substring)? */ -#define SCM_RWSTRINGP(x) (SCM_NIMP(x) && (SCM_TYP7(x) == scm_tc7_string)) -#define SCM_NRWSTRINGP(x) (! SCM_RWSTRINGP (x)) +#define SCM_RWSTRINGP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string)) - extern SCM scm_string_p (SCM x); extern SCM scm_read_only_string_p (SCM x); extern SCM scm_string (SCM chrs); @@ -81,6 +78,15 @@ extern SCM scm_string_append (SCM args); extern SCM scm_make_shared_substring (SCM str, SCM frm, SCM to); extern void scm_init_strings (void); + + +#if (SCM_DEBUG_DEPRECATED == 0) + +#define SCM_NSTRINGP(x) (!SCM_STRINGP(x)) +#define SCM_NRWSTRINGP(x) (! SCM_RWSTRINGP (x)) + +#endif /* SCM_DEBUG_DEPRECATED == 0 */ + #endif /* STRINGSH */ /* diff --git a/libguile/tags.h b/libguile/tags.h index 956fca89d..08a971b14 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -306,8 +306,7 @@ typedef long scm_bits_t; #define SCM_CELLP(x) (!SCM_NCELLP (x)) #define SCM_NCELLP(x) ((sizeof (scm_cell) - 1) & SCM_UNPACK (x)) -#define SCM_DOUBLE_CELLP(x) (!SCM_NDOUBLE_CELLP (x)) -#define SCM_NDOUBLE_CELLP(x) ((2 * sizeof (scm_cell) - 1) & SCM_UNPACK (x)) +#define SCM_DOUBLE_CELLP(x) (((2 * sizeof (scm_cell) - 1) & SCM_UNPACK (x)) == 0) /* See numbers.h for macros relating to immediate integers. */ @@ -581,6 +580,8 @@ extern char *scm_isymnames[]; /* defined in print.c */ #if (SCM_DEBUG_DEPRECATED == 0) +#define SCM_NDOUBLE_CELLP(x) (!SCM_DOUBLE_CELLP (x)) + #define scm_tc16_flo scm_tc16_real #define scm_tc_flo 0x017fL #define scm_tc_dblr scm_tc16_real diff --git a/libguile/vectors.h b/libguile/vectors.h index dd189f56b..aefeb086b 100644 --- a/libguile/vectors.h +++ b/libguile/vectors.h @@ -52,7 +52,6 @@ #define SCM_VECTORP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_vector)) -#define SCM_NVECTORP(x) (!SCM_VECTORP (x)) #define SCM_VELTS(x) ((SCM *) SCM_CELL_WORD_1 (x)) #define SCM_VELTS_AS_STACKITEMS(x) ((SCM_STACKITEM *) SCM_CELL_WORD_1 (x)) #define SCM_SETVELTS(x,v) (SCM_SET_CELL_WORD_1 ((x), (v))) @@ -85,6 +84,14 @@ extern SCM scm_vector_move_right_x (SCM vec1, SCM start1, SCM end1, SCM vec2, SCM start2); extern void scm_init_vectors (void); + + +#if (SCM_DEBUG_DEPRECATED == 0) + +#define SCM_NVECTORP(x) (!SCM_VECTORP (x)) + +#endif /* SCM_DEBUG_DEPRECATED == 0 */ + #endif /* VECTORSH */ /*