99 |
*/ |
*/ |
100 |
for (p += offset; p < end; p += span, offset += span) |
for (p += offset; p < end; p += span, offset += span) |
101 |
{ |
{ |
102 |
SCM scmptr = PTR2SCM(p); |
SCM scmptr = PTR2SCM (p); |
103 |
if (SCM_C_BVEC_GET (bitvec, offset)) |
if (SCM_C_BVEC_GET (bitvec, offset)) |
104 |
continue; |
continue; |
105 |
|
|
109 |
/* The card can be swept more than once. Check that it's |
/* The card can be swept more than once. Check that it's |
110 |
* the first time! |
* the first time! |
111 |
*/ |
*/ |
112 |
if (!SCM_STRUCT_GC_CHAIN (p)) |
if (!SCM_STRUCT_GC_CHAIN (scmptr)) |
113 |
{ |
{ |
114 |
/* Structs need to be freed in a special order. |
/* Structs need to be freed in a special order. |
115 |
* This is handled by GC C hooks in struct.c. |
* This is handled by GC C hooks in struct.c. |
116 |
*/ |
*/ |
117 |
SCM_SET_STRUCT_GC_CHAIN (p, scm_i_structs_to_free); |
SCM_SET_STRUCT_GC_CHAIN (scmptr, scm_i_structs_to_free); |
118 |
scm_i_structs_to_free = scmptr; |
scm_i_structs_to_free = scmptr; |
119 |
} |
} |
120 |
continue; |
continue; |
281 |
} |
} |
282 |
|
|
283 |
|
|
284 |
SCM_SET_CELL_TYPE (p, scm_tc_free_cell); |
SCM_SET_CELL_TYPE (scmptr, scm_tc_free_cell); |
285 |
SCM_SET_FREE_CELL_CDR (p, PTR2SCM (*free_list)); |
SCM_SET_FREE_CELL_CDR (scmptr, PTR2SCM (*free_list)); |
286 |
*free_list = PTR2SCM (p); |
*free_list = scmptr; |
287 |
free_count ++; |
free_count ++; |
288 |
} |
} |
289 |
|
|
315 |
*/ |
*/ |
316 |
for (; p > card; p -= span) |
for (; p > card; p -= span) |
317 |
{ |
{ |
318 |
SCM_SET_CELL_TYPE (p, scm_tc_free_cell); |
const SCM scmptr = PTR2SCM (p); |
319 |
SCM_SET_FREE_CELL_CDR (p, PTR2SCM (*free_list)); |
SCM_SET_CELL_TYPE (scmptr, scm_tc_free_cell); |
320 |
*free_list = PTR2SCM (p); |
SCM_SET_FREE_CELL_CDR (scmptr, PTR2SCM (*free_list)); |
321 |
|
*free_list = scmptr; |
322 |
} |
} |
323 |
|
|
324 |
return SCM_GC_CARD_N_CELLS - SCM_MAX(span, SCM_GC_CARD_N_HEADER_CELLS); |
return SCM_GC_CARD_N_CELLS - SCM_MAX(span, SCM_GC_CARD_N_HEADER_CELLS); |