Instead of putting the amount by which to increment the pointer and
then adding it at the end of the loop, increment the pointer
directly. Makes it slightly faster when compiled with GCC.
{
lispobj *end = start + n_words;
lispobj *object_ptr;
{
lispobj *end = start + n_words;
lispobj *object_ptr;
- sword_t n_words_scavenged;
-
- for (object_ptr = start;
- object_ptr < end;
- object_ptr += n_words_scavenged) {
+ for (object_ptr = start; object_ptr < end;) {
lispobj object = *object_ptr;
#ifdef LISP_FEATURE_GENCGC
if (forwarding_pointer_p(object_ptr))
lispobj object = *object_ptr;
#ifdef LISP_FEATURE_GENCGC
if (forwarding_pointer_p(object_ptr))
if (forwarding_pointer_p(ptr)) {
/* Yes, there's a forwarding pointer. */
*object_ptr = LOW_WORD(forwarding_pointer_value(ptr));
if (forwarding_pointer_p(ptr)) {
/* Yes, there's a forwarding pointer. */
*object_ptr = LOW_WORD(forwarding_pointer_value(ptr));
} else {
/* Scavenge that pointer. */
} else {
/* Scavenge that pointer. */
(scavtab[widetag_of(object)])(object_ptr, object);
}
} else {
/* It points somewhere other than oldspace. Leave it
* alone. */
(scavtab[widetag_of(object)])(object_ptr, object);
}
} else {
/* It points somewhere other than oldspace. Leave it
* alone. */
}
}
#if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
}
}
#if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
checking a single word and it's anything other than a
pointer, just hush it up */
int widetag = widetag_of(object);
checking a single word and it's anything other than a
pointer, just hush it up */
int widetag = widetag_of(object);
if ((scavtab[widetag] == scav_lose) ||
(((sizetab[widetag])(object_ptr)) > 1)) {
if ((scavtab[widetag] == scav_lose) ||
(((sizetab[widetag])(object_ptr)) > 1)) {
(see manual page for details).\n",
object, object_ptr);
}
(see manual page for details).\n",
object, object_ptr);
}
}
#endif
else if (fixnump(object)) {
/* It's a fixnum: really easy.. */
}
#endif
else if (fixnump(object)) {
/* It's a fixnum: really easy.. */
} else {
/* It's some sort of header object or another. */
} else {
/* It's some sort of header object or another. */
- n_words_scavenged =
- (scavtab[widetag_of(object)])(object_ptr, object);
+ object_ptr += (scavtab[widetag_of(object)])(object_ptr, object);
}
}
gc_assert_verbose(object_ptr == end, "Final object pointer %p, start %p, end %p\n",
}
}
gc_assert_verbose(object_ptr == end, "Final object pointer %p, start %p, end %p\n",