mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
* Scheme cells now consist of scm_bits_t values instead of SCM values.
* Use SCM_SETC[AD]R to modify contents of pairs.
This commit is contained in:
parent
5986c47d3a
commit
e828cb75d4
2 changed files with 21 additions and 11 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* gc.h (scm_cell, SCM_CELL_WORD, SCM_CELL_OBJECT,
|
||||||
|
SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT): Scheme cells now consist
|
||||||
|
of two scm_bits_t values instead of two SCM values, because it is
|
||||||
|
legal for cell entries to hold values that are not scheme objects.
|
||||||
|
|
||||||
|
(SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR):
|
||||||
|
Use SCM_SETC[AD]R to modify contents of pairs.
|
||||||
|
|
||||||
2000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* numbers.c (IS_INF, isfinite): Added FIXME comment.
|
* numbers.c (IS_INF, isfinite): Added FIXME comment.
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
|
|
||||||
typedef struct scm_cell
|
typedef struct scm_cell
|
||||||
{
|
{
|
||||||
SCM car;
|
scm_bits_t word_0;
|
||||||
SCM cdr;
|
scm_bits_t word_1;
|
||||||
} scm_cell;
|
} scm_cell;
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,25 +89,25 @@ typedef struct scm_cell
|
||||||
/* Low level cell data accessing macros:
|
/* Low level cell data accessing macros:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SCM_CELL_WORD(x, n) (SCM_UNPACK (((SCM *) SCM2PTR (x))[n]))
|
#define SCM_CELL_WORD(x, n) (((scm_bits_t *) SCM2PTR (x)) [n])
|
||||||
#define SCM_CELL_WORD_0(x) SCM_CELL_WORD (x, 0)
|
#define SCM_CELL_WORD_0(x) SCM_CELL_WORD (x, 0)
|
||||||
#define SCM_CELL_WORD_1(x) SCM_CELL_WORD (x, 1)
|
#define SCM_CELL_WORD_1(x) SCM_CELL_WORD (x, 1)
|
||||||
#define SCM_CELL_WORD_2(x) SCM_CELL_WORD (x, 2)
|
#define SCM_CELL_WORD_2(x) SCM_CELL_WORD (x, 2)
|
||||||
#define SCM_CELL_WORD_3(x) SCM_CELL_WORD (x, 3)
|
#define SCM_CELL_WORD_3(x) SCM_CELL_WORD (x, 3)
|
||||||
|
|
||||||
#define SCM_CELL_OBJECT(x, n) (((SCM *) SCM2PTR (x))[n])
|
#define SCM_CELL_OBJECT(x, n) (SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [n]))
|
||||||
#define SCM_CELL_OBJECT_0(x) SCM_CELL_OBJECT (x, 0)
|
#define SCM_CELL_OBJECT_0(x) SCM_CELL_OBJECT (x, 0)
|
||||||
#define SCM_CELL_OBJECT_1(x) SCM_CELL_OBJECT (x, 1)
|
#define SCM_CELL_OBJECT_1(x) SCM_CELL_OBJECT (x, 1)
|
||||||
#define SCM_CELL_OBJECT_2(x) SCM_CELL_OBJECT (x, 2)
|
#define SCM_CELL_OBJECT_2(x) SCM_CELL_OBJECT (x, 2)
|
||||||
#define SCM_CELL_OBJECT_3(x) SCM_CELL_OBJECT (x, 3)
|
#define SCM_CELL_OBJECT_3(x) SCM_CELL_OBJECT (x, 3)
|
||||||
|
|
||||||
#define SCM_SET_CELL_WORD(x, n, v) ((((SCM *) SCM2PTR (x))[n]) = SCM_PACK (v))
|
#define SCM_SET_CELL_WORD(x, n, v) ((((scm_bits_t *) SCM2PTR (x)) [n]) = (scm_bits_t) (v))
|
||||||
#define SCM_SET_CELL_WORD_0(x, v) SCM_SET_CELL_WORD (x, 0, v)
|
#define SCM_SET_CELL_WORD_0(x, v) SCM_SET_CELL_WORD (x, 0, v)
|
||||||
#define SCM_SET_CELL_WORD_1(x, v) SCM_SET_CELL_WORD (x, 1, v)
|
#define SCM_SET_CELL_WORD_1(x, v) SCM_SET_CELL_WORD (x, 1, v)
|
||||||
#define SCM_SET_CELL_WORD_2(x, v) SCM_SET_CELL_WORD (x, 2, v)
|
#define SCM_SET_CELL_WORD_2(x, v) SCM_SET_CELL_WORD (x, 2, v)
|
||||||
#define SCM_SET_CELL_WORD_3(x, v) SCM_SET_CELL_WORD (x, 3, v)
|
#define SCM_SET_CELL_WORD_3(x, v) SCM_SET_CELL_WORD (x, 3, v)
|
||||||
|
|
||||||
#define SCM_SET_CELL_OBJECT(x, n, v) ((((SCM *) SCM2PTR (x))[n]) = v)
|
#define SCM_SET_CELL_OBJECT(x, n, v) ((((scm_bits_t *) SCM2PTR (x)) [n]) = SCM_UNPACK (v))
|
||||||
#define SCM_SET_CELL_OBJECT_0(x, v) SCM_SET_CELL_OBJECT (x, 0, v)
|
#define SCM_SET_CELL_OBJECT_0(x, v) SCM_SET_CELL_OBJECT (x, 0, v)
|
||||||
#define SCM_SET_CELL_OBJECT_1(x, v) SCM_SET_CELL_OBJECT (x, 1, v)
|
#define SCM_SET_CELL_OBJECT_1(x, v) SCM_SET_CELL_OBJECT (x, 1, v)
|
||||||
#define SCM_SET_CELL_OBJECT_2(x, v) SCM_SET_CELL_OBJECT (x, 2, v)
|
#define SCM_SET_CELL_OBJECT_2(x, v) SCM_SET_CELL_OBJECT (x, 2, v)
|
||||||
|
@ -117,13 +117,13 @@ typedef struct scm_cell
|
||||||
#define SCM_SET_CELL_TYPE(x, t) SCM_SET_CELL_WORD_0 (x, t)
|
#define SCM_SET_CELL_TYPE(x, t) SCM_SET_CELL_WORD_0 (x, t)
|
||||||
|
|
||||||
#define SCM_SETAND_CAR(x, y) \
|
#define SCM_SETAND_CAR(x, y) \
|
||||||
(SCM_CAR (x) = SCM_PACK (SCM_UNPACK (SCM_CAR (x)) & (y)))
|
(SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) & (y))))
|
||||||
#define SCM_SETAND_CDR(x, y)\
|
#define SCM_SETAND_CDR(x, y)\
|
||||||
(SCM_CDR (x) = SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y)))
|
(SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y))))
|
||||||
#define SCM_SETOR_CAR(x, y)\
|
#define SCM_SETOR_CAR(x, y)\
|
||||||
(SCM_CAR (x) = SCM_PACK (SCM_UNPACK (SCM_CAR (x)) | (y)))
|
(SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) | (y))))
|
||||||
#define SCM_SETOR_CDR(x, y)\
|
#define SCM_SETOR_CDR(x, y)\
|
||||||
(SCM_CDR (x) = SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y)))
|
(SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
|
||||||
|
|
||||||
#define SCM_CELL_WORD_LOC(x, n) (&SCM_CELL_WORD (x, n))
|
#define SCM_CELL_WORD_LOC(x, n) (&SCM_CELL_WORD (x, n))
|
||||||
#define SCM_CARLOC(x) (&SCM_CAR (x))
|
#define SCM_CARLOC(x) (&SCM_CAR (x))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue