0.9.8.36:
[sbcl.git] / src / runtime / purify.c
index 5e86276..ba07c21 100644 (file)
  */
 static lispobj *dynamic_space_free_pointer;
 #endif
-extern unsigned long bytes_consed_between_gcs;
-
-#define gc_abort() \
-  lose("GC invariant lost, file \"%s\", line %d", __FILE__, __LINE__)
 
-#if 1
-#define gc_assert(ex) do { \
-        if (!(ex)) gc_abort(); \
-} while (0)
-#else
-#define gc_assert(ex)
-#endif
+extern unsigned long bytes_consed_between_gcs;
 
 \f
 /* These hold the original end of the read_only and static spaces so
@@ -127,14 +117,14 @@ newspace_alloc(long nwords, int constantp)
     lispobj *ret;
     nwords=CEILING(nwords,2);
     if(constantp) {
-        if(read_only_free + nwords >= READ_ONLY_SPACE_END) {
-            lose("Ran out of read-only space while purifying!");
+        if(read_only_free + nwords >= (lispobj *)READ_ONLY_SPACE_END) {
+            lose("Ran out of read-only space while purifying!\n");
         }
         ret=read_only_free;
         read_only_free+=nwords;
     } else {
-        if(static_free + nwords >= STATIC_SPACE_END) {
-            lose("Ran out of static space while purifying!");
+        if(static_free + nwords >= (lispobj *)STATIC_SPACE_END) {
+            lose("Ran out of static space while purifying!\n");
         }
         ret=static_free;
         static_free+=nwords;
@@ -547,8 +537,9 @@ ptrans_boxed(lispobj thing, lispobj header, boolean constant)
 static lispobj
 ptrans_instance(lispobj thing, lispobj header, boolean /* ignored */ constant)
 {
-    lispobj layout = ((struct instance *)native_pointer(thing))->slots[0];
-    lispobj pure = ((struct instance *)native_pointer(layout))->slots[15];
+    struct layout *layout =
+      (struct layout *) native_pointer(((struct instance *)native_pointer(thing))->slots[0]);
+    lispobj pure = layout->pure;
 
     switch (pure) {
     case T:
@@ -1491,9 +1482,8 @@ purify(lispobj static_roots, lispobj read_only_roots)
     printf(" handlers");
     fflush(stdout);
 #endif
-    pscav((lispobj *) all_threads->interrupt_data->interrupt_handlers,
-          sizeof(all_threads->interrupt_data->interrupt_handlers)
-          / sizeof(lispobj),
+    pscav((lispobj *) interrupt_handlers,
+          sizeof(interrupt_handlers) / sizeof(lispobj),
           0);
 
 #ifdef PRINTNOISE