Changeset 15827


Ignore:
Timestamp:
May 28, 2013, 1:12:53 PM (6 years ago)
Author:
gb
Message:

Make refidx optional when walking refidx_state;
Clear "nextbit" in oldbits, not uninitialized "bitidx".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gb-egc/lisp-kernel/gc-common.c

    r15823 r15827  
    11181118      p++;
    11191119    }
     1120    if (!s->refidx) {
     1121      return NULL;
     1122    }
    11201123    idx = s->idx;
    11211124    while (idx == 0) {
     
    11471150  s->refbits = refbits;
    11481151  s->idxp = refidx;
     1152  s->idx = 0;
     1153  s->refp = refbits;
     1154  s->reflimit = refbits + ((ndnodes + (WORD_SIZE-1)) >> bitmap_shift);
     1155  if (refidx == NULL) {
     1156    s->idxlimit = NULL;
     1157    s->rangelimit = s->reflimit;
     1158  } else {
    11491159  s->idxlimit = refidx + ((((ndnodes + 255) >> 8) + (WORD_SIZE-1)) >> bitmap_shift);
    1150   s->idx = 0;
    1151   s->reflimit = refbits + ((ndnodes + (WORD_SIZE-1)) >> bitmap_shift);
    1152   s->refp = s->rangelimit = s->idxbase = NULL;
     1160    s->rangelimit = s->idxbase = NULL;
     1161  }
    11531162}
    11541163
     
    14181427  dnode *dnodes = (dnode *)a->low, *d;
    14191428  LispObj *p = (LispObj *) a->low,x1, x2;
    1420   natural inbits, outbits, bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0, ref_dnode = 0;
     1429  natural inbits, outbits, bits,  *bitsp, nextbit, memo_dnode = 0, ref_dnode = 0;
    14211430  Boolean keep_x1, keep_x2;
    14221431  natural hash_dnode_limit = 0;
     
    15361545          (keep_x2 == false) &&
    15371546          (hashp == NULL)) {
    1538         outbits &= ~(BIT0_MASK >> bitidx);
     1547        outbits &= ~(BIT0_MASK >> nextbit);
    15391548      }
    15401549    }
     
    18821891      forward_memoized_area(managed_static_area,managed_static_area->ndnodes, managed_static_area->refbits, managed_static_area->refidx);
    18831892    } else {
    1884       forward_memoized_area(managed_static_area,area_dnode(managed_static_area->active,managed_static_area->low),managed_static_refbits, managed_static_refidx);
     1893      forward_memoized_area(managed_static_area,area_dnode(managed_static_area->active,managed_static_area->low),managed_static_refbits, NULL);
    18851894    }
    18861895    a->active = (BytePtr) ptr_from_lispobj(compact_dynamic_heap());
Note: See TracChangeset for help on using the changeset viewer.