diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-09-24 10:32:05 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-25 13:56:07 -0400 |
commit | 795986aaf33e2ffc233836b86a92a77366c91db2 (patch) | |
tree | 585a901153899c50bfced5a91f605dafa2c3fd7c /libraries/ghc-heap | |
parent | d90d0bade05fa63b81fe68d42c4242dd97c46e77 (diff) | |
download | haskell-795986aaf33e2ffc233836b86a92a77366c91db2.tar.gz |
Remove unneeded CPP now that GHC 8.6 is the minimum
The minimum required GHC version for bootstrapping is 8.6, so we can
get rid of some unneeded `#if `__GLASGOW_HASKELL__` CPP guards, as
well as one `MIN_VERSION_ghc_prim(0,5,3)` guard (since GHC 8.6 bundles
`ghc-prim-0.5.3`).
Diffstat (limited to 'libraries/ghc-heap')
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap.hs | 4 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc | 8 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc | 8 |
3 files changed, 0 insertions, 20 deletions
diff --git a/libraries/ghc-heap/GHC/Exts/Heap.hs b/libraries/ghc-heap/GHC/Exts/Heap.hs index 54481ccbca..4865dd60c9 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap.hs @@ -114,11 +114,7 @@ getClosureRaw x = do -- This is a hack to cover the bootstrap compiler using the old version of -- 'unpackClosure'. The new 'unpackClosure' return values are not merely -- a reordering, so using the old version would not work. -#if MIN_VERSION_ghc_prim(0,5,3) (# iptr, dat, pointers #) -> do -#else - (# iptr, pointers, dat #) -> do -#endif let nelems = (I# (sizeofByteArray# dat)) `div` wORD_SIZE end = fromIntegral nelems - 1 rawWds = [W# (indexWordArray# dat i) | I# i <- [0.. end] ] diff --git a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc index 95151b45ee..c700921465 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc +++ b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc @@ -38,11 +38,7 @@ peekItbl a0 = do ptrs' <- (#peek struct StgInfoTable_, layout.payload.ptrs) ptr nptrs' <- (#peek struct StgInfoTable_, layout.payload.nptrs) ptr tipe' <- (#peek struct StgInfoTable_, type) ptr -#if __GLASGOW_HASKELL__ > 804 srtlen' <- (#peek struct StgInfoTable_, srt) a0 -#else - srtlen' <- (#peek struct StgInfoTable_, srt_bitmap) ptr -#endif return StgInfoTable { entry = entry' , ptrs = ptrs' @@ -60,11 +56,7 @@ pokeItbl a0 itbl = do (#poke StgInfoTable, layout.payload.ptrs) a0 (ptrs itbl) (#poke StgInfoTable, layout.payload.nptrs) a0 (nptrs itbl) (#poke StgInfoTable, type) a0 (toHalfWord (fromEnum (tipe itbl))) -#if __GLASGOW_HASKELL__ > 804 (#poke StgInfoTable, srt) a0 (srtlen itbl) -#else - (#poke StgInfoTable, srt_bitmap) a0 (srtlen itbl) -#endif #if defined(TABLES_NEXT_TO_CODE) let code_offset = a0 `plusPtr` (#offset StgInfoTable, code) case code itbl of diff --git a/libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc b/libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc index 56d7caae70..ded386bb8d 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc +++ b/libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc @@ -35,11 +35,7 @@ peekItbl a0 = do ptrs' <- (#peek struct StgInfoTable_, layout.payload.ptrs) ptr nptrs' <- (#peek struct StgInfoTable_, layout.payload.nptrs) ptr tipe' <- (#peek struct StgInfoTable_, type) ptr -#if __GLASGOW_HASKELL__ > 804 srtlen' <- (#peek struct StgInfoTable_, srt) a0 -#else - srtlen' <- (#peek struct StgInfoTable_, srt_bitmap) ptr -#endif return StgInfoTable { entry = entry' , ptrs = ptrs' @@ -57,11 +53,7 @@ pokeItbl a0 itbl = do (#poke StgInfoTable, layout.payload.ptrs) a0 (ptrs itbl) (#poke StgInfoTable, layout.payload.nptrs) a0 (nptrs itbl) (#poke StgInfoTable, type) a0 (fromEnum (tipe itbl)) -#if __GLASGOW_HASKELL__ > 804 (#poke StgInfoTable, srt) a0 (srtlen itbl) -#else - (#poke StgInfoTable, srt_bitmap) a0 (srtlen itbl) -#endif #if defined(TABLES_NEXT_TO_CODE) let code_offset = a0 `plusPtr` (#offset StgInfoTable, code) case code itbl of |