X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fpurify.c;h=ba07c215c6d06def1eb939525a923b55019780c9;hb=bd5dfa4a42f34fe992cd4507989cc13120ed7e83;hp=5e86276657fc20b46cf65341f6860c0834683262;hpb=aaf74d586de62692c83c43f1359083d6e3eaf107;p=sbcl.git diff --git a/src/runtime/purify.c b/src/runtime/purify.c index 5e86276..ba07c21 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -46,18 +46,8 @@ */ 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; /* 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