* __scm.h: Reformulated the architecture and compiler properties
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Thu, 24 Jul 2003 06:32:20 +0000 (06:32 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Thu, 24 Jul 2003 06:32:20 +0000 (06:32 +0000)
in terms of properties of scm_t_bits and SCM variables rather than
in terms of c standard types.  This is since it is not known which
of the standard types scm_t_bits and SCM variables will be defined
to.

libguile/ChangeLog
libguile/__scm.h

index ed037db..ecf0b01 100644 (file)
@@ -1,3 +1,11 @@
+2003-07-24  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * __scm.h: Reformulated the architecture and compiler properties
+       in terms of properties of scm_t_bits and SCM variables rather than
+       in terms of c standard types.  This is since it is not known which
+       of the standard types scm_t_bits and SCM variables will be defined
+       to.
+
 2003-07-24  Kevin Ryde  <user42@zip.com.au>
 
        * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
index 7461506..8945d87 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef SCM___SCM_H
 #define SCM___SCM_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * Guile as of today can only work on systems which fulfill at least the
  * following requirements:
- * - long ints have at least 32 bits.
+ *
+ * - scm_t_bits and SCM variables have at least 32 bits.
  *   Guile's type system is based on this assumption.
- * - long ints consist of at least four characters.
- *   It is assumed that cells, i. e. pairs of long ints, are eight character
- *   aligned, because three bits of a cell pointer are used for type data.
- * - sizeof (void*) == sizeof (long int)
- *   Pointers are stored in SCM objects, and sometimes SCM objects are passed
- *   as void*.  Thus, there has to be a one-to-one correspondence.
+ *
+ * - sizeof (scm_t_bits) >= sizeof (void*) and sizeof (SCM) >= sizeof (void*)
+ *   Guile's type system is based on this assumption, since it must be
+ *   possible to store pointers to cells on the heap in scm_t_bits and SCM
+ *   variables.
+ *
+ * - sizeof (scm_t_bits) >= 4 and sizeof (scm_t_bits) is a power of 2.
+ *   Guile's type system is based on this assumption.  In particular, it is
+ *   assumed that cells, i. e. pairs of scm_t_bits variables, are eight
+ *   character aligned.  This is because three bits of a scm_t_bits variable
+ *   that is holding a pointer to a cell on the heap must be available for
+ *   storing type data.
+ *
+ * - sizeof (scm_t_bits) <= sizeof (void*) and sizeof (SCM) <= sizeof (void*)
+ *   In some parts of guile, scm_t_bits and SCM variables are passed to
+ *   functions as void* arguments.  Together with the requirement above, this
+ *   requires a one-to-one correspondence between the size of a void* and the
+ *   sizes of scm_t_bits and SCM variables.
+ *
  * - numbers are encoded using two's complement.
  *   The implementation of the bitwise scheme level operations is based on
  *   this assumption.
+ *
  * - ... add more
  */