Index: /trunk/source/lisp-kernel/arm-gc.c
===================================================================
--- /trunk/source/lisp-kernel/arm-gc.c	(revision 15373)
+++ /trunk/source/lisp-kernel/arm-gc.c	(revision 15374)
@@ -790,132 +790,5 @@
 
 
-void
-mark_memoized_area(area *a, natural num_memo_dnodes)
-{
-  bitvector refbits = a->refbits;
-  LispObj *p = (LispObj *) a->low, x1, x2;
-  natural inbits, outbits, bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0;
-  Boolean keep_x1, keep_x2;
-  natural hash_dnode_limit = 0;
-  hash_table_vector_header *hashp = NULL;
-  int mark_method = 3;
-
-  if (num_memo_dnodes) {
-    if (GCDebug) {
-      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-    }
-
-    /* The distinction between "inbits" and "outbits" is supposed to help us
-       detect cases where "uninteresting" setfs have been memoized.  Storing
-       NIL, fixnums, immediates (characters, etc.) or node pointers to static
-       or readonly areas is definitely uninteresting, but other cases are
-       more complicated (and some of these cases are hard to detect.)
-
-       Some headers are "interesting", to the forwarder if not to us. 
-
-    */
-
-    /*
-      We need to ensure that there are no bits set at or beyond
-      "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
-      tenures/untenures things.)  We find bits by grabbing a fullword at
-      a time and doing a cntlzw instruction; and don't want to have to
-      check for (< memo_dnode num_memo_dnodes) in the loop.
-    */
-
-    {
-      natural 
-        bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
-        index_of_last_word = (num_memo_dnodes >> bitmap_shift);
-
-      if (bits_in_last_word != 0) {
-        natural mask = ~((1L<<(nbits_in_word-bits_in_last_word))-1L);
-        refbits[index_of_last_word] &= mask;
-      }
-    }
-        
-    set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
-    inbits = outbits = bits;
-    while (memo_dnode < num_memo_dnodes) {
-      if (bits == 0) {
-        int remain = nbits_in_word - bitidx;
-        memo_dnode += remain;
-        p += (remain+remain);
-        if (outbits != inbits) {
-          *bitsp = outbits;
-        }
-        bits = *++bitsp;
-        inbits = outbits = bits;
-        bitidx = 0;
-      } else {
-        nextbit = count_leading_zeros(bits);
-        if ((diff = (nextbit - bitidx)) != 0) {
-          memo_dnode += diff;
-          bitidx = nextbit;
-          p += (diff+diff);
-        }
-        x1 = *p++;
-        x2 = *p++;
-        bits &= ~(BIT0_MASK >> bitidx);
-
-        if (hashp) {
-          Boolean force_x1 = false;
-          if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
-            /* if vector_header_count is odd, x1 might be the last word of the header */
-            force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
-            /* was marking header, switch to data */
-            hash_dnode_limit = area_dnode(((LispObj *)hashp)
-                                          + 1
-                                          + header_element_count(hashp->header),
-                                          a->low);
-            /* In traditional weak method, don't mark vector entries at all. */
-            /* Otherwise mark the non-weak elements only */
-            mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
-                           ((hashp->flags & nhash_weak_value_mask)
-                            ? (1 + (hash_table_vector_header_count & 1))
-                            : (2 - (hash_table_vector_header_count & 1))));
-          }
-
-          if (memo_dnode < hash_dnode_limit) {
-            /* perhaps ignore one or both of the elements */
-            if (!force_x1 && !(mark_method & 1)) x1 = 0;
-            if (!(mark_method & 2)) x2 = 0;
-          } else {
-            hashp = NULL;
-          }
-        }
-
-        if (header_subtag(x1) == subtag_hash_vector) {
-          if (hashp) Bug(NULL, "header inside hash vector?");
-          hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
-          if (hp->flags & nhash_weak_mask) {
-            /* Workaround for ticket:817 */
-            if (!(hp->flags & nhash_weak_value_mask)) {
-              /* If header_count is odd, this cuts off the last header field */
-              /* That case is handled specially above */
-              hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
-              hashp = hp;
-              mark_method = 3;
-            }
-          }
-        }
-
-        keep_x1 = mark_ephemeral_root(x1);
-        keep_x2 = mark_ephemeral_root(x2);
-        if ((keep_x1 == false) && 
-            (keep_x2 == false) &&
-            (hashp == NULL)) {
-          outbits &= ~(BIT0_MASK >> bitidx);
-        }
-        memo_dnode++;
-        bitidx++;
-      }
-    }
-    if (GCDebug) {
-      p = (LispObj *) a->low;
-      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-    }
-  }
-}
+
 
 
Index: /trunk/source/lisp-kernel/gc-common.c
===================================================================
--- /trunk/source/lisp-kernel/gc-common.c	(revision 15373)
+++ /trunk/source/lisp-kernel/gc-common.c	(revision 15374)
@@ -1354,4 +1354,140 @@
 }
 
+void
+mark_memoized_area(area *a, natural num_memo_dnodes)
+{
+  bitvector refbits = a->refbits;
+  LispObj *p = (LispObj *) a->low, x1, x2;
+  natural inbits, outbits, bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0;
+  Boolean keep_x1, keep_x2;
+  natural hash_dnode_limit = 0;
+  hash_table_vector_header *hashp = NULL;
+  int mark_method = 3;
+
+  if (num_memo_dnodes) {
+    if (GCDebug) {
+      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
+    }
+
+    /* The distinction between "inbits" and "outbits" is supposed to help us
+       detect cases where "uninteresting" setfs have been memoized.  Storing
+       NIL, fixnums, immediates (characters, etc.) or node pointers to static
+       or readonly areas is definitely uninteresting, but other cases are
+       more complicated (and some of these cases are hard to detect.)
+
+       Some headers are "interesting", to the forwarder if not to us. 
+
+    */
+
+    /*
+      We need to ensure that there are no bits set at or beyond
+      "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
+      tenures/untenures things.)  We find bits by grabbing a fullword at
+      a time and doing a cntlzw instruction; and don't want to have to
+      check for (< memo_dnode num_memo_dnodes) in the loop.
+    */
+
+    {
+      natural 
+        bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
+        index_of_last_word = (num_memo_dnodes >> bitmap_shift);
+
+      if (bits_in_last_word != 0) {
+        natural mask = ~((NATURAL1<<(nbits_in_word-bits_in_last_word))- NATURAL1);
+        refbits[index_of_last_word] &= mask;
+      }
+    }
+        
+    set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
+    inbits = outbits = bits;
+    while (memo_dnode < num_memo_dnodes) {
+      if (bits == 0) {
+        int remain = nbits_in_word - bitidx;
+        memo_dnode += remain;
+        p += (remain+remain);
+        if (outbits != inbits) {
+          *bitsp = outbits;
+        }
+        if (memo_dnode < num_memo_dnodes) {
+          bits = *++bitsp;
+        } 
+        inbits = outbits = bits;
+        bitidx = 0;
+      } else {
+        nextbit = count_leading_zeros(bits);
+        if ((diff = (nextbit - bitidx)) != 0) {
+          memo_dnode += diff;
+          bitidx = nextbit;
+          p += (diff+diff);
+        }
+        x1 = *p++;
+        x2 = *p++;
+        bits &= ~(BIT0_MASK >> bitidx);
+
+
+        if (hashp) {
+          Boolean force_x1 = false;
+          if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
+            /* if vector_header_count is odd, x1 might be the last word of the header */
+            force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
+            /* was marking header, switch to data */
+            hash_dnode_limit = area_dnode(((LispObj *)hashp)
+                                          + 1
+                                          + header_element_count(hashp->header),
+                                          a->low);
+            /* In traditional weak method, don't mark vector entries at all. */
+            /* Otherwise mark the non-weak elements only */
+            mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
+                           ((hashp->flags & nhash_weak_value_mask)
+                            ? (1 + (hash_table_vector_header_count & 1))
+                            : (2 - (hash_table_vector_header_count & 1))));
+          }
+
+          if (memo_dnode < hash_dnode_limit) {
+            /* perhaps ignore one or both of the elements */
+            if (!force_x1 && !(mark_method & 1)) x1 = 0;
+            if (!(mark_method & 2)) x2 = 0;
+          } else {
+            hashp = NULL;
+          }
+        }
+
+        if (header_subtag(x1) == subtag_hash_vector) {
+          if (hashp) Bug(NULL, "header inside hash vector?");
+          hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
+          if (hp->flags & nhash_weak_mask) {
+            /* Work around the issue that seems to cause ticket:817,
+               which is that tenured hash vectors that are weak on value
+               aren't always maintained on GCweakvll.  If they aren't and
+               we process them weakly here, nothing will delete the unreferenced
+               elements. */
+            if (!(hp->flags & nhash_weak_value_mask)) {
+              /* If header_count is odd, this cuts off the last header field */
+              /* That case is handled specially above */
+              hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
+              hashp = hp;
+              mark_method = 3;
+            }
+          }
+        }
+
+        keep_x1 = mark_ephemeral_root(x1);
+        keep_x2 = mark_ephemeral_root(x2);
+        if ((keep_x1 == false) && 
+            (keep_x2 == false) &&
+            (hashp == NULL)) {
+          outbits &= ~(BIT0_MASK >> bitidx);
+        }
+        memo_dnode++;
+        bitidx++;
+      }
+    }
+    if (GCDebug) {
+      p = (LispObj *) a->low;
+      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
+    }
+  }
+}
+
 extern void zero_dnodes(void *,natural);
 
Index: /trunk/source/lisp-kernel/ppc-gc.c
===================================================================
--- /trunk/source/lisp-kernel/ppc-gc.c	(revision 15373)
+++ /trunk/source/lisp-kernel/ppc-gc.c	(revision 15374)
@@ -906,130 +906,4 @@
 
 
-void
-mark_memoized_area(area *a, natural num_memo_dnodes)
-{
-  bitvector refbits = a->refbits;
-  LispObj *p = (LispObj *) a->low, x1, x2;
-  natural inbits, outbits, bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0;
-  Boolean keep_x1, keep_x2;
-  natural hash_dnode_limit = 0;
-  hash_table_vector_header *hashp = NULL;
-  int mark_method = 3;
-
-  if (GCDebug) {
-    check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-  }
-
-  /* The distinction between "inbits" and "outbits" is supposed to help us
-     detect cases where "uninteresting" setfs have been memoized.  Storing
-     NIL, fixnums, immediates (characters, etc.) or node pointers to static
-     or readonly areas is definitely uninteresting, but other cases are
-     more complicated (and some of these cases are hard to detect.)
-
-     Some headers are "interesting", to the forwarder if not to us. 
-
-  */
-
-  /*
-    We need to ensure that there are no bits set at or beyond
-    "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
-    tenures/untenures things.)  We find bits by grabbing a fullword at
-    a time and doing a cntlzw instruction; and don't want to have to
-    check for (< memo_dnode num_memo_dnodes) in the loop.
-  */
-
-  {
-    natural 
-      bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
-      index_of_last_word = (num_memo_dnodes >> bitmap_shift);
-
-    if (bits_in_last_word != 0) {
-      natural mask = ~((1L<<(nbits_in_word-bits_in_last_word))-1L);
-      refbits[index_of_last_word] &= mask;
-    }
-  }
-        
-  set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
-  inbits = outbits = bits;
-  while (memo_dnode < num_memo_dnodes) {
-    if (bits == 0) {
-      int remain = nbits_in_word - bitidx;
-      memo_dnode += remain;
-      p += (remain+remain);
-      if (outbits != inbits) {
-        *bitsp = outbits;
-      }
-      bits = *++bitsp;
-      inbits = outbits = bits;
-      bitidx = 0;
-    } else {
-      nextbit = count_leading_zeros(bits);
-      if ((diff = (nextbit - bitidx)) != 0) {
-        memo_dnode += diff;
-        bitidx = nextbit;
-        p += (diff+diff);
-      }
-      x1 = *p++;
-      x2 = *p++;
-      bits &= ~(BIT0_MASK >> bitidx);
-
-      if (hashp) {
-        Boolean force_x1 = false;
-        if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
-          /* if vector_header_count is odd, x1 might be the last word of the header */
-          force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
-          /* was marking header, switch to data */
-          hash_dnode_limit = area_dnode(((LispObj *)hashp)
-                                        + 1
-                                        + header_element_count(hashp->header),
-                                        a->low);
-          /* In traditional weak method, don't mark vector entries at all. */
-          /* Otherwise mark the non-weak elements only */
-          mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
-                         ((hashp->flags & nhash_weak_value_mask)
-                          ? (1 + (hash_table_vector_header_count & 1))
-                          : (2 - (hash_table_vector_header_count & 1))));
-        }
-
-        if (memo_dnode < hash_dnode_limit) {
-          /* perhaps ignore one or both of the elements */
-          if (!force_x1 && !(mark_method & 1)) x1 = 0;
-          if (!(mark_method & 2)) x2 = 0;
-        } else {
-          hashp = NULL;
-        }
-      }
-
-      if (header_subtag(x1) == subtag_hash_vector) {
-        if (hashp) Bug(NULL, "header inside hash vector?");
-        hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
-        /* Workaround for ticket:817 */
-        if (!(hp->flags & nhash_weak_value_mask)) {
-          if (hp->flags & nhash_weak_mask) {
-            /* If header_count is odd, this cuts off the last header field */
-            /* That case is handled specially above */
-            hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
-            hashp = hp;
-            mark_method = 3;
-          }
-        }
-      }
-
-      keep_x1 = mark_ephemeral_root(x1);
-      keep_x2 = mark_ephemeral_root(x2);
-      if ((keep_x1 == false) && 
-          (keep_x2 == false) &&
-          (hashp == NULL)) {
-        outbits &= ~(BIT0_MASK >> bitidx);
-      }
-      memo_dnode++;
-      bitidx++;
-    }
-  }
-  if (GCDebug) {
-    p = (LispObj *) a->low;
-    check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-  }
-}
 
 
Index: /trunk/source/lisp-kernel/x86-gc.c
===================================================================
--- /trunk/source/lisp-kernel/x86-gc.c	(revision 15373)
+++ /trunk/source/lisp-kernel/x86-gc.c	(revision 15374)
@@ -1234,142 +1234,5 @@
 
 
-void
-mark_memoized_area(area *a, natural num_memo_dnodes)
-{
-  bitvector refbits = a->refbits;
-  LispObj *p = (LispObj *) a->low, x1, x2;
-  natural inbits, outbits, bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0;
-  Boolean keep_x1, keep_x2;
-  natural hash_dnode_limit = 0;
-  hash_table_vector_header *hashp = NULL;
-  int mark_method = 3;
-
-  if (num_memo_dnodes) {
-    if (GCDebug) {
-      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-    }
-
-    /* The distinction between "inbits" and "outbits" is supposed to help us
-       detect cases where "uninteresting" setfs have been memoized.  Storing
-       NIL, fixnums, immediates (characters, etc.) or node pointers to static
-       or readonly areas is definitely uninteresting, but other cases are
-       more complicated (and some of these cases are hard to detect.)
-
-       Some headers are "interesting", to the forwarder if not to us. 
-
-    */
-
-    /*
-      We need to ensure that there are no bits set at or beyond
-      "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
-      tenures/untenures things.)  We find bits by grabbing a fullword at
-      a time and doing a cntlzw instruction; and don't want to have to
-      check for (< memo_dnode num_memo_dnodes) in the loop.
-    */
-
-    {
-      natural 
-        bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
-        index_of_last_word = (num_memo_dnodes >> bitmap_shift);
-
-      if (bits_in_last_word != 0) {
-        natural mask = ~((NATURAL1<<(nbits_in_word-bits_in_last_word))- NATURAL1);
-        refbits[index_of_last_word] &= mask;
-      }
-    }
-        
-    set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
-    inbits = outbits = bits;
-    while (memo_dnode < num_memo_dnodes) {
-      if (bits == 0) {
-        int remain = nbits_in_word - bitidx;
-        memo_dnode += remain;
-        p += (remain+remain);
-        if (outbits != inbits) {
-          *bitsp = outbits;
-        }
-        bits = *++bitsp;
-        inbits = outbits = bits;
-        bitidx = 0;
-      } else {
-        nextbit = count_leading_zeros(bits);
-        if ((diff = (nextbit - bitidx)) != 0) {
-          memo_dnode += diff;
-          bitidx = nextbit;
-          p += (diff+diff);
-        }
-        x1 = *p++;
-        x2 = *p++;
-        bits &= ~(BIT0_MASK >> bitidx);
-
-
-        if (hashp) {
-          Boolean force_x1 = false;
-          if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
-            /* if vector_header_count is odd, x1 might be the last word of the header */
-            force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
-            /* was marking header, switch to data */
-            hash_dnode_limit = area_dnode(((LispObj *)hashp)
-                                          + 1
-                                          + header_element_count(hashp->header),
-                                          a->low);
-            /* In traditional weak method, don't mark vector entries at all. */
-            /* Otherwise mark the non-weak elements only */
-            mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
-                           ((hashp->flags & nhash_weak_value_mask)
-                            ? (1 + (hash_table_vector_header_count & 1))
-                            : (2 - (hash_table_vector_header_count & 1))));
-          }
-
-          if (memo_dnode < hash_dnode_limit) {
-            /* perhaps ignore one or both of the elements */
-            if (!force_x1 && !(mark_method & 1)) x1 = 0;
-            if (!(mark_method & 2)) x2 = 0;
-          } else {
-            hashp = NULL;
-          }
-        }
-
-        if (header_subtag(x1) == subtag_hash_vector) {
-          if (hashp) Bug(NULL, "header inside hash vector?");
-          hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
-          if (hp->flags & nhash_weak_mask) {
-            /* Work around the issue that seems to cause ticket:817,
-               which is that tenured hash vectors that are weak on value
-               aren't always maintained on GCweakvll.  If they aren't and
-               we process them weakly here, nothing will delete the unreferenced
-               elements. */
-            if (!(hp->flags & nhash_weak_value_mask)) {
-              /* If header_count is odd, this cuts off the last header field */
-              /* That case is handled specially above */
-              hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
-              hashp = hp;
-              mark_method = 3;
-
-
-
-
-
-            }
-          }
-        }
-
-        keep_x1 = mark_ephemeral_root(x1);
-        keep_x2 = mark_ephemeral_root(x2);
-        if ((keep_x1 == false) && 
-            (keep_x2 == false) &&
-            (hashp == NULL)) {
-          outbits &= ~(BIT0_MASK >> bitidx);
-        }
-        memo_dnode++;
-        bitidx++;
-      }
-    }
-    if (GCDebug) {
-      p = (LispObj *) a->low;
-      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-    }
-  }
-}
+
 
 void
