mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
* Minor cleanups in scm_mark_locations.
This commit is contained in:
parent
0491498616
commit
c4da09e2dd
2 changed files with 59 additions and 53 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* gc.c (scm_mark_locations): Minimized some variable scopes and
|
||||
simplified the code a bit.
|
||||
|
||||
2000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* gc.h (SCM_SET_FREE_CELL_TYPE, SCM_SET_FREE_CELL_CDR,
|
||||
|
|
|
@ -1212,16 +1212,16 @@ gc_mark_nimp:
|
|||
void
|
||||
scm_mark_locations (SCM_STACKITEM x[], scm_sizet n)
|
||||
{
|
||||
register long m = n;
|
||||
register int i, j;
|
||||
register SCM_CELLPTR ptr;
|
||||
unsigned long m;
|
||||
|
||||
while (0 <= --m)
|
||||
if (SCM_CELLP (* (SCM *) &x[m]))
|
||||
for (m = 0; m < n; ++m)
|
||||
{
|
||||
ptr = SCM2PTR (* (SCM *) &x[m]);
|
||||
i = 0;
|
||||
j = scm_n_heap_segs - 1;
|
||||
SCM obj = * (SCM *) &x[m];
|
||||
if (SCM_CELLP (obj))
|
||||
{
|
||||
SCM_CELLPTR ptr = SCM2PTR (obj);
|
||||
int i = 0;
|
||||
int j = scm_n_heap_segs - 1;
|
||||
if (SCM_PTR_LE (scm_heap_table[i].bounds[0], ptr)
|
||||
&& SCM_PTR_GT (scm_heap_table[j].bounds[1], ptr))
|
||||
{
|
||||
|
@ -1260,13 +1260,14 @@ scm_mark_locations (SCM_STACKITEM x[], scm_sizet n)
|
|||
}
|
||||
}
|
||||
if (scm_heap_table[seg_id].span == 1
|
||||
|| SCM_DOUBLE_CELLP (* (SCM *) &x[m]))
|
||||
scm_gc_mark (* (SCM *) &x[m]);
|
||||
|| SCM_DOUBLE_CELLP (obj))
|
||||
scm_gc_mark (obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* The function scm_cellp determines whether an SCM value can be regarded as a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue