Change layout bitmap so that 0 = raw, 1 = tagged
commitf6157e8553d964b956572f3e3f48ef5d6e4e6838
authorDouglas Katzman <dougk@google.com>
Sun, 11 Sep 2016 15:45:28 +0000 (11 11:45 -0400)
committerDouglas Katzman <dougk@google.com>
Sun, 11 Sep 2016 15:52:44 +0000 (11 11:52 -0400)
tree4550aa0b458de8ac5cfd0f9f651361d78ecdc61e
parentb7f16a36fa71da699f1d6b6ff2032be87fee3782
Change layout bitmap so that 0 = raw, 1 = tagged

For structures containing a mixture of raw and non-raw slots, integer-length
of the bitmap suffices to determine the upper bound of tagged slots, without
having to look at instance-length. The special case of -1 indicates zero raw
slots. These changes make uses of the bitmap from C more natural,
because you usually care abouts slots to examine, not slots to skip,
and 1 is the obvious bit value for this purpose.

Also fix a bug in print_struct that shifted an integer by a larger count
than the size of the type, which is undefined behavior.
15 files changed:
src/code/class.lisp
src/code/defstruct.lisp
src/code/early-classoid.lisp
src/code/early-raw-slots.lisp
src/code/fop.lisp
src/code/pred.lisp
src/code/target-defstruct.lisp
src/compiler/dump.lisp
src/compiler/early-c.lisp
src/compiler/generic/genesis.lisp
src/compiler/ir1tran.lisp
src/runtime/gc-common.c
src/runtime/print.c
src/runtime/purify.c
tests/raw-slots-interleaved.impure.lisp