Make the heap_scavenge() loop a little tighter.
commit43b2bfefb1a852fd17c8d8f6809b39cfea4aa16a
authorDouglas Katzman <dougk@google.com>
Sat, 1 Apr 2017 00:36:12 +0000 (31 20:36 -0400)
committerDouglas Katzman <dougk@google.com>
Sat, 1 Apr 2017 00:36:12 +0000 (31 20:36 -0400)
tree51782cb93a5dcd2f8fdba53bbb35c21659e2cb6f
parentce427145862cb8df9757016a42019a8a3f4b03f0
Make the heap_scavenge() loop a little tighter.

It's the customary two-way split: conses and everything else,
which handily eliminates the special case of fixnump()
while also unrolling the cons for maximum speed.

Non-conses are a little interesting if the car contains a Lisp immediate
because we have to scavenge 2 words, not 1. This works because of the
separation into heap_scavenge() versus scavenge() done previously.
Without that change, we'd have a problem as noted in scav_immediate about
accidentally reading 2 words when we meant to read 1. But that can't happen
on the heap, only on stacks, which don't use heap_scavenge().
i.e. if a character or single-float (on 64-bit) or unbound-marker
resides on a stack, scavenge() just ignores the thing.
src/runtime/gc-common.c