Skip to content

Commit

Permalink
FIX #1038: failure of selector-thunk machinery to do its job
Browse files Browse the repository at this point in the history
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
Simon Marlow committed Sep 17, 2007
1 parent 442099a commit 2018c43
Showing 1 changed file with 146 additions and 213 deletions.

0 comments on commit 2018c43

Please sign in to comment.