[project @ 2003-03-24 14:46:53 by simonmar]
Fix some bugs in compacting GC.
Bug 1: When threading the fields of an AP or PAP, we were grabbing the
info table of the function without unthreading it first.
Bug 2: eval_thunk_selector() might accidentally find itself in
to-space when going through indirections in a compacted generation.
We must check for this case and bale out if necessary.
Bug 3: This is somewhat more nasty. When we have an AP or PAP that
points to a BCO, the layout info for the AP/PAP is in the BCO's
instruction array, which is two objects deep from the AP/PAP itself.
The trouble is, during compacting GC, we can only safely look one
object deep from the current object, because pointers from objects any
deeper might have been already updated to point to their final
destinations.
The solution is to put the arity and bitmap info for a BCO into the
BCO object itself. This means BCOs become variable-length, which is a
slight annoyance, but it also means that looking up the arity/bitmap
is quicker. There is a slight reduction in complexity in the byte
code generator due to not having to stuff the bitmap at the front of
the instruction stream.
13 files changed: