Skip to content
  • Ben Gamari's avatar
    rts: Fix compaction of SmallMutArrPtrs · 0d40fd75
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    This was blatantly wrong due to copy-paste blindness:
    
     * labels were shadowed, which GHC doesn't warn about(!), resulting in
       plainly wrong behavior
     * the sharing check was omitted
     * the wrong closure layout was being used
    
    Moreover, the test wasn't being run due to its primitive dependency, so
    I didn't even notice. Sillyness.
    
    Test Plan: install `primitive`, `make test TEST=compact_small_array`
    
    Reviewers: simonmar, erikd
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #13857.
    
    Differential Revision: https://phabricator.haskell.org/D4702
    
    (cherry picked from commit 12deb9a9)
    0d40fd75