X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fpurify.c;h=992df23c5c4022c5cd36eccb218ece44f2fc32e6;hb=568214ddf4c8ecc881caec98e20848d017974ec0;hp=1c92c0a080b46b73011bafefb9f7a69e681c567b;hpb=629bc05208573daaeca6e00541b528420a8454b5;p=sbcl.git diff --git a/src/runtime/purify.c b/src/runtime/purify.c index 1c92c0a..992df23 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -33,6 +33,7 @@ #include "thread.h" #include "genesis/primitive-objects.h" #include "genesis/static-symbols.h" +#include "genesis/layout.h" #define PRINTNOISE @@ -90,7 +91,7 @@ static long later_count = 0; /* FIXME: Shouldn't this be defined in sbcl.h? See also notes in * cheneygc.c */ -#ifdef sparc +#ifdef LISP_FEATURE_SPARC #define FUN_RAW_ADDR_OFFSET 0 #else #define FUN_RAW_ADDR_OFFSET (6*sizeof(lispobj) - FUN_POINTER_LOWTAG) @@ -1054,7 +1055,7 @@ ptrans_otherptr(lispobj thing, lispobj header, boolean constant) #ifdef LISP_FEATURE_X86 return ptrans_vector(thing, 96, 0, 0, constant); #endif -#ifdef sparc +#ifdef LISP_FEATURE_SPARC return ptrans_vector(thing, 128, 0, 0, constant); #endif #endif @@ -1074,7 +1075,7 @@ ptrans_otherptr(lispobj thing, lispobj header, boolean constant) #ifdef LISP_FEATURE_X86 return ptrans_vector(thing, 192, 0, 0, constant); #endif -#ifdef sparc +#ifdef LISP_FEATURE_SPARC return ptrans_vector(thing, 256, 0, 0, constant); #endif #endif @@ -1323,7 +1324,7 @@ pscav(lispobj *addr, long nwords, boolean constant) #ifdef LISP_FEATURE_X86 count = fixnum_value(vector->length)*3+2; #endif -#ifdef sparc +#ifdef LISP_FEATURE_SPARC count = fixnum_value(vector->length)*4+2; #endif break; @@ -1343,7 +1344,7 @@ pscav(lispobj *addr, long nwords, boolean constant) #ifdef LISP_FEATURE_X86 count = fixnum_value(vector->length)*6+2; #endif -#ifdef sparc +#ifdef LISP_FEATURE_SPARC count = fixnum_value(vector->length)*8+2; #endif break; @@ -1392,6 +1393,18 @@ pscav(lispobj *addr, long nwords, boolean constant) count = pscav_fdefn((struct fdefn *)addr); break; + case INSTANCE_HEADER_WIDETAG: + { + struct instance *instance = (struct instance *) addr; + struct layout *layout + = (struct layout *) native_pointer(instance->slots[0]); + long nuntagged = fixnum_value(layout->n_untagged_slots); + long nslots = HeaderValue(*addr); + pscav(addr + 1, nslots - nuntagged, constant); + count = CEILING(1 + nslots, 2); + } + break; + default: count = 1; break;