mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
Removed use of SCM_POINTERS_MUNGED.
This commit is contained in:
parent
0cbaaf0b15
commit
96f6f4aebf
3 changed files with 13 additions and 25 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* tags.h (SCM_POINTERS_MUNGED): Removed.
|
||||||
|
|
||||||
|
* gc.c (scm_gc_sweep, init_heap_seg): Removed use of
|
||||||
|
SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
|
||||||
|
|
||||||
2000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
|
* pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
|
||||||
|
|
|
@ -1587,12 +1587,6 @@ void
|
||||||
scm_gc_sweep ()
|
scm_gc_sweep ()
|
||||||
{
|
{
|
||||||
register SCM_CELLPTR ptr;
|
register SCM_CELLPTR ptr;
|
||||||
#ifdef SCM_POINTERS_MUNGED
|
|
||||||
register SCM scmptr;
|
|
||||||
#else
|
|
||||||
#undef scmptr
|
|
||||||
#define scmptr (SCM)ptr
|
|
||||||
#endif
|
|
||||||
register SCM nfreelist;
|
register SCM nfreelist;
|
||||||
register scm_freelist_t *freelist;
|
register scm_freelist_t *freelist;
|
||||||
register long m;
|
register long m;
|
||||||
|
@ -1638,9 +1632,8 @@ scm_gc_sweep ()
|
||||||
seg_size = CELL_DN (scm_heap_table[i].bounds[1], span) - ptr;
|
seg_size = CELL_DN (scm_heap_table[i].bounds[1], span) - ptr;
|
||||||
for (j = seg_size + span; j -= span; ptr += span)
|
for (j = seg_size + span; j -= span; ptr += span)
|
||||||
{
|
{
|
||||||
#ifdef SCM_POINTERS_MUNGED
|
SCM scmptr = PTR2SCM (ptr);
|
||||||
scmptr = PTR2SCM (ptr);
|
|
||||||
#endif
|
|
||||||
switch SCM_TYP7 (scmptr)
|
switch SCM_TYP7 (scmptr)
|
||||||
{
|
{
|
||||||
case scm_tcs_cons_gloc:
|
case scm_tcs_cons_gloc:
|
||||||
|
@ -2161,12 +2154,6 @@ static scm_sizet
|
||||||
init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
|
init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
|
||||||
{
|
{
|
||||||
register SCM_CELLPTR ptr;
|
register SCM_CELLPTR ptr;
|
||||||
#ifdef SCM_POINTERS_MUNGED
|
|
||||||
register SCM scmptr;
|
|
||||||
#else
|
|
||||||
#undef scmptr
|
|
||||||
#define scmptr ptr
|
|
||||||
#endif
|
|
||||||
SCM_CELLPTR seg_end;
|
SCM_CELLPTR seg_end;
|
||||||
int new_seg_index;
|
int new_seg_index;
|
||||||
int n_new_cells;
|
int n_new_cells;
|
||||||
|
@ -2246,9 +2233,8 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
|
||||||
|
|
||||||
while (ptr < seg_end)
|
while (ptr < seg_end)
|
||||||
{
|
{
|
||||||
#ifdef SCM_POINTERS_MUNGED
|
SCM scmptr = PTR2SCM (ptr);
|
||||||
scmptr = PTR2SCM (ptr);
|
|
||||||
#endif
|
|
||||||
SCM_SETCAR (scmptr, scm_tc_free_cell);
|
SCM_SETCAR (scmptr, scm_tc_free_cell);
|
||||||
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
|
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
|
||||||
ptr += span;
|
ptr += span;
|
||||||
|
@ -2270,9 +2256,8 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
|
||||||
*/
|
*/
|
||||||
while (ptr < seg_end)
|
while (ptr < seg_end)
|
||||||
{
|
{
|
||||||
#ifdef SCM_POINTERS_MUNGED
|
SCM scmptr = PTR2SCM (ptr);
|
||||||
scmptr = PTR2SCM (ptr);
|
|
||||||
#endif
|
|
||||||
SCM_SETCAR (scmptr, (SCM) scm_tc_free_cell);
|
SCM_SETCAR (scmptr, (SCM) scm_tc_free_cell);
|
||||||
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
|
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
|
||||||
ptr += span;
|
ptr += span;
|
||||||
|
@ -2294,9 +2279,6 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
|
||||||
fprintf (stderr, "H");
|
fprintf (stderr, "H");
|
||||||
#endif
|
#endif
|
||||||
return size;
|
return size;
|
||||||
#ifdef scmptr
|
|
||||||
#undef scmptr
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GUILE_NEW_GC_SCHEME
|
#ifndef GUILE_NEW_GC_SCHEME
|
||||||
|
|
|
@ -87,7 +87,6 @@ typedef void * SCM;
|
||||||
#ifdef _UNICOS
|
#ifdef _UNICOS
|
||||||
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x) >> 3))
|
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x) >> 3))
|
||||||
# define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
|
# define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
|
||||||
# define SCM_POINTERS_MUNGED
|
|
||||||
#else
|
#else
|
||||||
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x)))
|
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x)))
|
||||||
# define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
|
# define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue