Fix #+(and immobile-space (not compact-instance-header)) some more
commit0bf1231b88c95b474ed00a6471a407fe588c6255
authorDouglas Katzman <dougk@google.com>
Thu, 14 Sep 2017 14:11:05 +0000 (14 10:11 -0400)
committerDouglas Katzman <dougk@google.com>
Thu, 14 Sep 2017 14:25:21 +0000 (14 10:25 -0400)
tree284b245eac9019d8173eb2c9f2cee69263d2f38b
parent8408fe5a71b5c52b2394408fa9d083594bf5fbb9
Fix #+(and immobile-space (not compact-instance-header)) some more

* set_instance_layout always stored a layout into the high bits of an instance
  header even though it should be in slots[0]. Using it was seemingly harmless,
  but the object got a bad pointer in its header, confusing if naught else.
  Defining instance_layout() to be an lvalue makes it clearer, and exposed a
  bug that fix_object_layout() before the call in instance_scan() during
  defragmentation touched the stored instance layout more than once.

* Rename fin_layout() to funinstance_layout()

* Add another assertion into verify_range()

* Don't use instance_layout() to mean function_layout()
src/runtime/coreparse.c
src/runtime/gc-common.c
src/runtime/gc-internal.h
src/runtime/gencgc.c
src/runtime/marknsweepgc.c
src/runtime/print.c
src/runtime/runtime.h