Changeset 10187


Ignore:
Timestamp:
Jul 23, 2008, 4:24:24 PM (11 years ago)
Author:
gb
Message:

lose interned_pname_bytes_in_range(), which hasn't been used in a
while.

Otherwise, propagate the change from r10186 (purify/freeze interaction)
to working-0711 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/x86-gc.c

    r9990 r10187  
    16871687}
    16881688
    1689 
    1690 
    1691 
    1692 /*
    1693   This may overestimate a bit, if the same symbol is accessible from multiple
    1694   packages.
    1695 */
    1696 natural
    1697 interned_pname_bytes_in_range(LispObj *start, LispObj *end)
    1698 {
    1699   lispsymbol *rawsym = (lispsymbol *)(&(nrs_ALL_PACKAGES));
    1700   LispObj pkg_list = rawsym->vcell, htab, obj, pname, pname_header;
    1701   package *p;
    1702   cons *c;
    1703   natural elements, i, nbytes = 0;
    1704 
    1705   while (fulltag_of(pkg_list) == fulltag_cons) {
    1706     c = (cons *) ptr_from_lispobj(untag(pkg_list));
    1707     p = (package *) ptr_from_lispobj(untag(c->car));
    1708     pkg_list = c->cdr;
    1709     c = (cons *) ptr_from_lispobj(untag(p->itab));
    1710     htab = c->car;
    1711     elements = header_element_count(header_of(htab));
    1712     for (i = 1; i<= elements; i++) {
    1713       obj = deref(htab,i);
    1714       if (fulltag_of(obj) == fulltag_symbol) {
    1715         rawsym = (lispsymbol *) ptr_from_lispobj(untag(obj));
    1716         pname = rawsym->pname;
    1717 
    1718         if ((pname >= (LispObj)start) && (pname < (LispObj)end)) {
    1719           pname_header = header_of(pname);
    1720           nbytes += ((8 + (header_element_count(pname_header)<<2) + 15) &~15);
    1721         }
    1722       }
    1723     }
    1724     c = (cons *) ptr_from_lispobj(untag(p->etab));
    1725     htab = c->car;
    1726     elements = header_element_count(header_of(htab));
    1727     for (i = 1; i<= elements; i++) {
    1728       obj = deref(htab,i);
    1729       if (fulltag_of(obj) == fulltag_symbol) {
    1730         rawsym = (lispsymbol *) ptr_from_lispobj(untag(obj));
    1731         pname = rawsym->pname;
    1732 
    1733         if ((pname >= (LispObj)start) && (pname < (LispObj)end)) {
    1734           pname_header = header_of(pname);
    1735           nbytes += ((8 + (header_element_count(pname_header)<<2) + 15) &~15);
    1736         }
    1737       }
    1738     }
    1739   }
    1740   return nbytes;
    1741 }
    1742 
    17431689Boolean
    17441690copy_ivector_reference(LispObj *ref, BytePtr low, BytePtr high, area *dest)
     
    19911937  TCR  *other_tcr;
    19921938  natural max_pure_size;
    1993   BytePtr new_pure_start;
    1994 
    1995 
    1996 
    1997   max_pure_size = unboxed_bytes_in_range((LispObj *)(a->low + (static_dnodes_for_area(a) << dnode_shift)),
    1998                                          (LispObj *) a->active);
     1939  BytePtr new_pure_start,
     1940    low = (a->low + (static_dnodes_for_area(a) << dnode_shift)),
     1941    high = a->active;
     1942
     1943
     1944  max_pure_size = unboxed_bytes_in_range((LispObj *) low, (LispObj *) high);
    19991945  new_pure_area = extend_readonly_area(max_pure_size);
    20001946  if (new_pure_area) {
     
    20131959
    20141960   
    2015     purify_areas(a->low, a->active, new_pure_area);
     1961    purify_areas(low, high, new_pure_area);
    20161962   
    20171963    other_tcr = tcr;
    20181964    do {
    2019       purify_tcr_xframes(other_tcr, a->low, a->active, new_pure_area);
    2020       purify_tcr_tlb(other_tcr, a->low, a->active, new_pure_area);
     1965      purify_tcr_xframes(other_tcr, low, high, new_pure_area);
     1966      purify_tcr_tlb(other_tcr, low, high, new_pure_area);
    20211967      other_tcr = other_tcr->next;
    20221968    } while (other_tcr != tcr);
    20231969
    2024     purify_gcable_ptrs(a->low, a->active, new_pure_area);
     1970    purify_gcable_ptrs(low, high, new_pure_area);
    20251971    {
    20261972      natural puresize = (unsigned) (new_pure_area->active-new_pure_start);
Note: See TracChangeset for help on using the changeset viewer.