X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgc-common.c;h=26bc938b8a803ecd4d31d8eaa5a8496362b6ac06;hb=531b03cfcbc4071c5283309f05d9186e051e5513;hp=acbadae73dbfd6b7e72c91a66e2527fc04e7e43e;hpb=9c9c68bd6e5e3c6d02e9f1bfd583b87bb9e85eea;p=sbcl.git diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c index acbadae..26bc938 100644 --- a/src/runtime/gc-common.c +++ b/src/runtime/gc-common.c @@ -42,6 +42,7 @@ #include #include +#include #include "runtime.h" #include "sbcl.h" #include "os.h" @@ -112,7 +113,6 @@ copy_object(lispobj object, int nwords) { int tag; lispobj *new; - lispobj *source, *dest; gc_assert(is_lisp_pointer(object)); gc_assert(from_space_p(object)); @@ -124,18 +124,8 @@ copy_object(lispobj object, int nwords) /* Allocate space. */ new = gc_general_alloc(nwords*4,ALLOC_BOXED,ALLOC_QUICK); - dest = new; - source = (lispobj *) native_pointer(object); - /* Copy the object. */ - while (nwords > 0) { - dest[0] = source[0]; - dest[1] = source[1]; - dest += 2; - source += 2; - nwords -= 2; - } - + memcpy(new,native_pointer(object),nwords*4); return make_lispobj(new,tag); } @@ -144,14 +134,12 @@ static int scav_lose(lispobj *where, lispobj object); /* forward decl */ /* FIXME: Most calls end up going to some trouble to compute an * 'n_words' value for this function. The system might be a little * simpler if this function used an 'end' parameter instead. */ - void scavenge(lispobj *start, long n_words) { lispobj *end = start + n_words; lispobj *object_ptr; int n_words_scavenged; - for (object_ptr = start; object_ptr < end; object_ptr += n_words_scavenged) { @@ -327,7 +315,7 @@ trans_code(struct code *code) /* fix self pointer. */ nfheaderp->self = -#ifdef LISP_FEATURE_GENCGC /* GENCGC? Maybe x86 is better conditional */ +#ifdef LISP_FEATURE_X86 FUN_RAW_ADDR_OFFSET + #endif nfheaderl;