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 
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.


snoyberg/ghc,nushio3/ghc,wxwxwwxxx/ghc,elieux/ghc,mcschroeder/ghc,acowley/ghc,gcampax/ghc,ezyang/ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,da-x/ghc,hferreiro/replay,shlevy/ghc,AlexanderPankiv/ghc,mettekou/ghc,snoyberg/ghc,siddhanathan/ghc,tibbe/ghc,AlexanderPankiv/ghc,nomeata/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,gcampax/ghc,christiaanb/ghc,mcmaniac/ghc,nomeata/ghc,ilyasergey/GHC-XAppFix,tibbe/ghc,sdiehl/ghc,nathyong/microghc-ghc,oldmanmike/ghc,urbanslug/ghc,jstolarek/ghc,ekmett/ghc,ml9951/ghc,lukexi/ghc-7.8-arm64,green-haskell/ghc,ezyang/ghc,olsner/ghc,jstolarek/ghc,christiaanb/ghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,olsner/ghc,urbanslug/ghc,nkaretnikov/ghc,elieux/ghc,bitemyapp/ghc,AlexanderPankiv/ghc,nushio3/ghc,snoyberg/ghc,ml9951/ghc,mcmaniac/ghc,ml9951/ghc,sgillespie/ghc,acowley/ghc,ekmett/ghc,siddhanathan/ghc,shlevy/ghc,mettekou/ghc,lukexi/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,shlevy/ghc,mcschroeder/ghc,mfine/ghc,holzensp/ghc,christiaanb/ghc,siddhanathan/ghc,GaloisInc/halvm-ghc,ryantm/ghc,tjakway/ghcjvm,mfine/ghc,ml9951/ghc,vikraman/ghc,christiaanb/ghc,snoyberg/ghc,fmthoma/ghc,hferreiro/replay,oldmanmike/ghc,GaloisInc/halvm-ghc,ghc-android/ghc,green-haskell/ghc,TomMD/ghc,gridaphobe/ghc,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc-7.8-arm64,vikraman/ghc,nathyong/microghc-ghc,oldmanmike/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,nathyong/microghc-ghc,holzensp/ghc,hferreiro/replay,green-haskell/ghc,wxwxwwxxx/ghc,christiaanb/ghc,vTurbine/ghc,urbanslug/ghc,wxwxwwxxx/ghc,mcschroeder/ghc,spacekitteh/smcghc,gridaphobe/ghc,sgillespie/ghc,nkaretnikov/ghc,mfine/ghc,ekmett/ghc,da-x/ghc,ghc-android/ghc,jstolarek/ghc,green-haskell/ghc,christiaanb/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,da-x/ghc,fmthoma/ghc,ryantm/ghc,mcschroeder/ghc,AlexanderPankiv/ghc,mettekou/ghc,sdiehl/ghc,nushio3/ghc,ryantm/ghc,ilyasergey/GHC-XAppFix,ezyang/ghc,holzensp/ghc,sdiehl/ghc,GaloisInc/halvm-ghc,ryantm/ghc,anton-dessiatov/ghc,gcampax/ghc,mettekou/ghc,fmthoma/ghc,TomMD/ghc,acowley/ghc,ezyang/ghc,ml9951/ghc,mettekou/ghc,sdiehl/ghc,sdiehl/ghc,christiaanb/ghc,nkaretnikov/ghc,ryantm/ghc,mfine/ghc,hferreiro/replay,sgillespie/ghc,ilyasergey/GHC-XAppFix,ghc-android/ghc,lukexi/ghc-7.8-arm64,vikraman/ghc,GaloisInc/halvm-ghc,anton-dessiatov/ghc,elieux/ghc,vikraman/ghc,urbanslug/ghc,lukexi/ghc,frantisekfarka/ghc-dsi,lukexi/ghc-7.8-arm64,jstolarek/ghc,shlevy/ghc,vikraman/ghc,snoyberg/ghc,olsner/ghc,nkaretnikov/ghc,nkaretnikov/ghc,mcschroeder/ghc,nkaretnikov/ghc,hferreiro/replay,gridaphobe/ghc,ezyang/ghc,gcampax/ghc,AlexanderPankiv/ghc,ml9951/ghc,vTurbine/ghc,sdiehl/ghc,lukexi/ghc,olsner/ghc,mettekou/ghc,siddhanathan/ghc,tibbe/ghc,snoyberg/ghc,mettekou/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,TomMD/ghc,wxwxwwxxx/ghc,TomMD/ghc,bitemyapp/ghc,vTurbine/ghc,AlexanderPankiv/ghc,nomeata/ghc,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,hferreiro/replay,da-x/ghc,ilyasergey/GHC-XAppFix,bitemyapp/ghc,siddhanathan/ghc,ekmett/ghc,mfine/ghc,ghc-android/ghc,nomeata/ghc,olsner/ghc,oldmanmike/ghc,urbanslug/ghc,vTurbine/ghc,green-haskell/ghc,tjakway/ghcjvm,acowley/ghc,ezyang/ghc,olsner/ghc,TomMD/ghc,gridaphobe/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,oldmanmike/ghc,fmthoma/ghc,shlevy/ghc,acowley/ghc,nathyong/microghc-ghc,fmthoma/ghc,da-x/ghc,tjakway/ghcjvm,mcschroeder/ghc,hferreiro/replay,nathyong/microghc-ghc,shlevy/ghc,spacekitteh/smcghc,lukexi/ghc,sdiehl/ghc,vikraman/ghc,nushio3/ghc,GaloisInc/halvm-ghc,acowley/ghc,nathyong/microghc-ghc,bitemyapp/ghc,nushio3/ghc,elieux/ghc,gcampax/ghc,lukexi/ghc,fmthoma/ghc,frantisekfarka/ghc-dsi,mcmaniac/ghc,da-x/ghc,elieux/ghc,da-x/ghc,urbanslug/ghc,nathyong/microghc-ghc,lukexi/ghc-7.8-arm64,vikraman/ghc,oldmanmike/ghc,TomMD/ghc,nushio3/ghc,urbanslug/ghc,ml9951/ghc,AlexanderPankiv/ghc,mfine/ghc,ekmett/ghc,siddhanathan/ghc,TomMD/ghc,sgillespie/ghc,shlevy/ghc,ghc-android/ghc,gcampax/ghc,jstolarek/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,anton-dessiatov/ghc,mcmaniac/ghc,snoyberg/ghc,mfine/ghc,tibbe/ghc,bitemyapp/ghc,ezyang/ghc,sgillespie/ghc,ml9951/ghc,frantisekfarka/ghc-dsi,elieux/ghc,forked-upstream-packages-for-ghcjs/ghc,spacekitteh/smcghc,gcampax/ghc,holzensp/ghc,sgillespie/ghc,ghc-android/ghc,siddhanathan/ghc,anton-dessiatov/ghc,gridaphobe/ghc,nkaretnikov/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,nomeata/ghc,vTurbine/ghc,acowley/ghc,mcmaniac/ghc,tjakway/ghcjvm,elieux/ghc,holzensp/ghc,nushio3/ghc,tibbe/ghc,ghc-android/ghc,vTurbine/ghc,spacekitteh/smcghc,olsner/ghc,mcschroeder/ghc