X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fpurify.c;h=cc8496e9e669b04d57d506a912f5d326e79632af;hb=add57c72c932fbf70c8ba8297154936c908b410e;hp=db8050594f2c8a6ee55bd27179951c73d1939066;hpb=f066d290280613acfdeedebf8c93b04692a4a7f9;p=sbcl.git diff --git a/src/runtime/purify.c b/src/runtime/purify.c index db80505..cc8496e 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -19,9 +19,9 @@ #include #include +#include "sbcl.h" #include "runtime.h" #include "os.h" -#include "sbcl.h" #include "globals.h" #include "validate.h" #include "interrupt.h" @@ -35,9 +35,12 @@ #define PRINTNOISE -#if defined(LISP_FEATURE_X86) -/* again, what's so special about the x86 that this is differently - * visible there than on other platforms? -dan 20010125 +#if defined(LISP_FEATURE_GENCGC) +/* this is another artifact of the poor integration between gencgc and + * the rest of the runtime: on cheney gc there is a global + * dynamic_space_free_pointer which is valid whenever foreign function + * call is active, but in gencgc there's no such variable and we have + * to keep our own */ static lispobj *dynamic_space_free_pointer; #endif @@ -113,7 +116,8 @@ dynamic_pointer_p(lispobj ptr) #endif } -static inline newspace_alloc(int nwords, int constantp) +static inline lispobj * +newspace_alloc(int nwords, int constantp) { lispobj *ret; nwords=CEILING(nwords,2); @@ -735,7 +739,11 @@ ptrans_code(lispobj thing) pscav_later(&new->debug_info, 1); /* FIXME: why would this be a fixnum? */ - if (!(new->trace_table_offset & (EVEN_FIXNUM_LOWTAG|ODD_FIXNUM_LOWTAG))) + /* "why" is a hard word, but apparently for compiled functions the + trace_table_offset contains the length of the instructions, as + a fixnum. See CODE-INST-AREA-LENGTH in + src/compiler/target-disassem.lisp. -- CSR, 2004-01-08 */ + if (!(fixnump(new->trace_table_offset))) #if 0 pscav(&new->trace_table_offset, 1, 0); #else @@ -852,7 +860,7 @@ ptrans_list(lispobj thing, boolean constant) struct cons *old, *new, *orig; int length; - orig = newspace_alloc(0,constant); + orig = (struct cons *) newspace_alloc(0,constant); length = 0; do { @@ -1475,7 +1483,7 @@ purify(lispobj static_roots, lispobj read_only_roots) SetSymbolValue(READ_ONLY_SPACE_FREE_POINTER, (lispobj)read_only_free,0); SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free,0); -#if !defined(LISP_FEATURE_X86) +#if !defined(ALLOCATION_POINTER) dynamic_space_free_pointer = current_dynamic_space; set_auto_gc_trigger(bytes_consed_between_gcs); #else