Changeset 13514


Ignore:
Timestamp:
Mar 12, 2010, 1:00:23 AM (9 years ago)
Author:
gb
Message:

In purify_range(), if we're walking the dynamic area and encounter
an ivector or function before encountering a reference to that ivector/
function and we're copying ivectors/functions to the readonly area,
do the copy at that point. (We otherwise miss some things that're
forward-referenced and wind up copying them to the static area instead.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-gc.c

    r13511 r13514  
    24822482purify_range(LispObj *start, LispObj *end, BytePtr low, BytePtr high, area *to, int what, Boolean recursive)
    24832483{
    2484   LispObj header;
     2484  LispObj header, pfn;
    24852485  unsigned tag;
    24862486  natural nwords;
     
    24942494      tag = fulltag_of(header);
    24952495      if (immheader_tag_p(tag)) {
     2496        if ((what & PURIFY_IVECTORS) &&
     2497            (to == readonly_area) &&
     2498            (header_subtag(header) != subtag_macptr) &&
     2499            ((BytePtr)start >= low) &&
     2500            ((BytePtr)start < high)) {
     2501          purify_object((LispObj)start,to);
     2502        }
    24962503        start = (LispObj *)skip_over_ivector((natural)start, header);
    24972504      } else if (nodeheader_tag_p(tag)) {
     
    25282535          *start++ = 0;
    25292536        } else {
     2537          pfn = 0;
    25302538          if (header_subtag(header) == subtag_function) {
    25312539#ifdef X8632
     
    25382546            int skip = (int)(start[1]);
    25392547#endif
     2548            pfn = (LispObj)start;
    25402549            start += skip;
    25412550            nwords -= skip;
     
    25452554            copy_reference(start, low, high, to, what, recursive);
    25462555            start++;
     2556          }
     2557          if (((BytePtr)pfn >= low) &&
     2558              ((BytePtr)pfn < high) &&
     2559              (what & PURIFY_FUNCTIONS) &&
     2560              (to == readonly_area) &&
     2561              (immutable_function_p(pfn))) {
     2562            purify_object(pfn, to);
    25472563          }
    25482564        }
Note: See TracChangeset for help on using the changeset viewer.