Changeset 12924


Ignore:
Timestamp:
Oct 8, 2009, 5:41:11 AM (10 years ago)
Author:
rme
Message:

wp_update_range(): try to update hash vectors correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/watchpoints/lisp-kernel/x86-gc.c

    r12815 r12924  
    28132813 */
    28142814
    2815 static inline void
     2815static inline int
    28162816wp_maybe_update(LispObj *p, LispObj old, LispObj new)
    28172817{
    28182818  if (*p == old) {
    28192819    *p = new;
    2820   }
     2820    return true;
     2821  }
     2822  return false;
    28212823}
    28222824
     
    28482850    } else if (nodeheader_tag_p(tag_n)) {
    28492851      nwords = header_element_count(node);
    2850      
    28512852      nwords += 1 - (nwords & 1);
    28522853
     
    28592860        nwords -= skip;
    28602861        while(skip--) {
    2861           if (*p == old) *p = new;
     2862          wp_maybe_update(p, old, new);
    28622863          p++;
    28632864        }
     
    28682869        nwords >>= 1;
    28692870        while(nwords--) {
    2870           if (*p == old && hashp) {
    2871             *p = new;
     2871          if (wp_maybe_update(p, old, new) && hashp) {
    28722872            hashp->flags |= nhash_key_moved_mask;
    28732873            hashp = NULL;
    28742874          }
    28752875          p++;
    2876           if (*p == old) *p = new;
     2876          wp_maybe_update(p, old, new);
    28772877          p++;
    28782878        }
Note: See TracChangeset for help on using the changeset viewer.