Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX #1038: failure of selector-thunk machinery to do its job
After a couple of abortive attempts, I think I've got this right. When the GC sees a chain of the form snd (_, snd (_, snd (_, ...))) it can now deal with an arbitrary nesting depth, whereas previously it had a depth limit which was necessitated by the use of recursion. Now we chain all the selector thunks together in the heap, and go back and update them all when we find the value at the end of the chain. While I was here I removed some old cruft in eval_thunk_selector() which was carefully manintaing invariants that aren't necessary any more, the main one being that evacuate() can safely be passed a to-space pointer now. In addition to validate I've tested building a stage3 compiler with and without +RTS -c, so I'm reasonably sure this is safe.
- Loading branch information