/[guile]/guile/guile-core/libguile/gc-card.c
ViewVC logotype

Diff of /guile/guile-core/libguile/gc-card.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by hanwen, Wed Apr 9 09:29:43 2003 UTC revision 1.15 by dirk, Sun Apr 20 08:39:38 2003 UTC
# Line 99  scm_i_sweep_card (scm_t_cell *  p, SCM * Line 99  scm_i_sweep_card (scm_t_cell *  p, SCM *
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    
# Line 109  scm_i_sweep_card (scm_t_cell *  p, SCM * Line 109  scm_i_sweep_card (scm_t_cell *  p, SCM *
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;
# Line 281  scm_i_sweep_card (scm_t_cell *  p, SCM * Line 281  scm_i_sweep_card (scm_t_cell *  p, SCM *
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    
# Line 315  scm_i_init_card_freelist (scm_t_cell * Line 315  scm_i_init_card_freelist (scm_t_cell *
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);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26