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

* Makefile.am: Let 'make clean' remove *.x and *.doc files.

* Renamed SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS.
* Removed conditionally compiled code for Turbo C.
* gdbint.c:  Eliminated call to scm_tag.
This commit is contained in:
Dirk Herrmann 2000-05-16 12:11:08 +00:00
parent 3c9f20f849
commit 5610071627
9 changed files with 51 additions and 79 deletions

View file

@ -1,3 +1,22 @@
2000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
* Makefile.am: Let 'make clean' remove *.x and *.doc files.
* __scm.h: Improved explanation of giving options to make.
* __scm.h (SCM_DEBUG_TYPING_STRICTNESS), tags.h
(SCM_STRICT_TYPING, SCM_DEBUG_TYPING_STRICTNESS): Renamed
SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS and moved the
corresponding declaration and comment to __scm.h.
* _scm.h (errno), gc.h (SCM_CELLPTR, SCM_PTR_LT), numbers.c
(scm_remainder, scm_modulo), numbers.h (SCM_SRS, SCM_MAKINUM,
SCM_INUM): Removed conditionally compiled code for Turbo C.
* gdbint.c (gdb_maybe_valid_type_p): Eliminated call to scm_tag.
That check can be assumed to be redundant except for very rare
conditions that actually indicate broken heap data.
2000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.c (scm_logcount, scm_integer_length): Reordered

View file

@ -224,7 +224,4 @@ MOSTLYCLEANFILES = \
cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
CLEANFILES = libpath.h
DISTCLEANFILES = *.x *.doc
CLEANFILES = libpath.h *.x *.doc

View file

@ -147,7 +147,8 @@
*
* Note: Some SCM_DEBUG_XXX options are not settable at configure time.
* To change the value of such options you will have to edit this header
* file or give -DSCM_DEBUG_XXX options to make.
* file or give suitable options to make, like:
* make all CFLAGS="-DSCM_DEBUG_XXX=1 ..."
*/
@ -158,6 +159,15 @@
#define SCM_DEBUG_DEPRECATED 0
#endif
/* Use this for _compile time_ type checking only, since the compiled result
* will be quite inefficient. The right way to make use of this option is to
* do a 'make clean; make CFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=1', fix your
* errors, and then do 'make clean; make'.
*/
#ifndef SCM_DEBUG_TYPING_STRICTNESS
#define SCM_DEBUG_TYPING_STRICTNESS 0
#endif
#ifdef HAVE_LONG_LONGS

View file

@ -121,12 +121,6 @@
extern int errno;
# endif /* def ARM_ULIB */
#endif /* ndef MSDOS */
#ifdef __TURBOC__
# if (__TURBOC__==1)
/* Needed for TURBOC V1.0 */
extern int errno;
# endif /* (__TURBOC__==1) */
#endif /* def __TURBOC__ */

View file

@ -63,11 +63,7 @@ typedef struct scm_cell
/* SCM_CELLPTR is a pointer to a cons cell which may be compared or
* differenced.
*/
#if !defined (__TURBOC__) || defined (__TOS__) || defined (PROT386)
typedef scm_cell * SCM_CELLPTR;
#else
typedef scm_cell huge * SCM_CELLPTR;
#endif
typedef scm_cell * SCM_CELLPTR;
/* Cray machines have pointers that are incremented once for each word,
@ -134,21 +130,12 @@ typedef struct scm_cell
* same scm_array).
*/
#if !defined(__TURBOC__) || defined(__TOS__)
#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 */
#else /* defined(__TURBOC__) && !defined(__TOS__) */
#ifdef PROT386
#define SCM_PTR_LT(x, y) (((long) (x)) < ((long) (y)))
#else
#define SCM_PTR_LT(x, y) ((x) < (y))
#endif /* def PROT386 */
#endif /* defined(__TURBOC__) && !defined(__TOS__) */
#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_LE(x, y) (!SCM_PTR_GT (x, y))

View file

@ -168,9 +168,7 @@ remark_port (SCM port)
int
gdb_maybe_valid_type_p (SCM value)
{
if (SCM_IMP (value) || scm_cellp (value))
return (! SCM_EQ_P (scm_tag (value), SCM_MAKINUM (-1)));
return 0;
return SCM_IMP (value) || scm_cellp (value);
}

View file

@ -265,11 +265,7 @@ scm_remainder (SCM x, SCM y)
if (yy == 0) {
scm_num_overflow (s_remainder);
} else {
#if (__TURBOC__ == 1)
long z = SCM_INUM (x) % (yy < 0 ? -yy : yy);
#else
long z = SCM_INUM (x) % yy;
#endif
return SCM_MAKINUM (z);
}
} else if (SCM_BIGP (y)) {
@ -310,11 +306,7 @@ scm_modulo (SCM x, SCM y)
if (yy == 0) {
scm_num_overflow (s_modulo);
} else {
#if (__TURBOC__ == 1)
long z = ((yy < 0) ? -xx : xx) % yy;
#else
long z = xx % yy;
#endif
return SCM_MAKINUM (((yy < 0) ? (z > 0) : (z < 0)) ? z + yy : z);
}
} else if (SCM_BIGP (y)) {

View file

@ -63,40 +63,21 @@
* SCM_INUMP (SCM_CAR (x)) can give wrong answers.
*/
/* SCM_SRS is signed right shift */
#if (-1 == (((-1) << 2) + 2) >> 2)
# define SCM_SRS(x, y) ((x) >> (y))
#else
# define SCM_SRS(x, y) ((SCM_UNPACK (x) < 0) ? ~((~SCM_UNPACK (x)) >> (y)) : (SCM_UNPACK (x) >> (y)))
#endif /* (-1 == (((-1) << 2) + 2) >> 2) */
#define SCM_INUMP(x) (2 & SCM_UNPACK (x))
#define SCM_NINUMP(x) (!SCM_INUMP (x))
#ifdef __TURBOC__
/* shifts of more than one are done by a library call, single shifts are
* performed in registers
*/
# define SCM_MAKINUM(x) (SCM_PACK ((((x) << 1) << 1) + 2L))
#else
# define SCM_MAKINUM(x) (SCM_PACK (((x) << 2) + 2L))
#endif /* def __TURBOC__ */
#define SCM_MAKINUM(x) (SCM_PACK (((x) << 2) + 2L))
#define SCM_INUM(x) (SCM_SRS (SCM_UNPACK (x), 2))
/* SCM_SRS is signed right shift */
/* SCM_INUM makes a C int from an SCM immediate number. */
/* Turbo C++ v1.0 has a bug with right shifts of signed longs!
* It is believed to be fixed in Turbo C++ v1.01
*/
#if (-1==(((-1)<<2)+2)>>2) && (__TURBOC__ != 0x295)
# define SCM_SRS(x, y) ((x) >> y)
# ifdef __TURBOC__
# define SCM_INUM(x) ((SCM_UNPACK (x) >>1) >>1)
# else
# define SCM_INUM(x) SCM_SRS (SCM_UNPACK (x), 2)
# endif /* def __TURBOC__ */
#else
# define SCM_SRS(x, y)\
((SCM_UNPACK (x) < 0) ? ~( (~SCM_UNPACK (x)) >> y) : (SCM_UNPACK (x) >> y))
# define SCM_INUM(x) SCM_SRS (SCM_UNPACK (x), 2)
#endif /* (-1==(((-1)<<2)+2)>>2) && (__TURBOC__ != 0x295) */
/* A name for 0.
*/
/* A name for 0. */
#define SCM_INUM0 (SCM_MAKINUM (0))

View file

@ -54,7 +54,6 @@
/* #define SCM_STRICT_TYPING */
/* #define SCM_VOIDP_TEST */
/* In the beginning was the Word:
@ -64,12 +63,7 @@ typedef long scm_bits_t;
/* But as external interface, we use SCM, which may, according to the desired
* level of type checking, be defined in several ways:
*/
#if defined (SCM_STRICT_TYPING)
/* Use this for _compile time_ type checking only, since the compiled result
* will be quite inefficient. The right way to make use of this mode is to do
* a 'make clean' of your project, 'make all CFLAGS=-DSCM_STRICT_TYPING', fix
* your errors, and then do 'make clean; make all'.
*/
#if (SCM_DEBUG_TYPING_STRICTNESS == 1)
typedef union { struct { scm_bits_t n; } n; } SCM;
static SCM scm_pack(scm_bits_t b) { SCM s; s.n.n = b; return s; }
#define SCM_UNPACK(x) ((x).n.n)