[Git][ghc/ghc][wip/T23479] 2 commits: Fix build

Serge S. Gulin (@gulin.serge) gitlab at gitlab.haskell.org
Thu Sep 19 07:13:13 UTC 2024



Serge S. Gulin pushed to branch wip/T23479 at Glasgow Haskell Compiler / GHC


Commits:
a0f3672e by Serge S. Gulin at 2024-09-19T10:11:13+03:00
Fix build

- - - - -
91765d8e by Serge S. Gulin at 2024-09-19T10:12:46+03:00
String lits were removed too early, need do it at Linker instead

- - - - -


1 changed file:

- compiler/GHC/StgToJS/Sinker/Sinker.hs


Changes:

=====================================
compiler/GHC/StgToJS/Sinker/Sinker.hs
=====================================
@@ -23,11 +23,11 @@ import GHC.StgToJS.Utils
 import Data.Char
 import Data.List (partition)
 import Data.Maybe
-import Data.Bifunctor (Bifunctor (..))
-import GHC.Utils.Outputable (showSDocUnsafe, showPprUnsafe)
-import qualified GHC.Utils.Trace as DT
 import Data.ByteString (ByteString)
 
+import GHC.Utils.Outputable (showSDocUnsafe, showPprUnsafe)
+import qualified GHC.Utils.Trace as DT_GHC
+
 
 -- | Unfloat some top-level unexported things
 --
@@ -54,18 +54,13 @@ sinkPgm m pgm
     usedOnceIds = selectUsedOnce $ concatMap collectArgs pgm'
 
     stringLitsUFM = listToUFM $ (\(i, b) -> (idName i, (i, b))) <$> allStringLits
-    (pgm'', usedStringLitNames) =
+    (pgm'', _actuallyUnfloatedStringLitNames) =
       unfloatStringLits
         (idName `mapUniqSet` usedOnceIds)
         (snd `mapUFM` stringLitsUFM)
         pgm'
 
-    stringLitsWithoutUnfolded =
-      nonDetEltsUFM
-      $ delListFromUFM stringLitsUFM
-      $ nonDetEltsUniqSet usedStringLitNames
-
-    stringLits = uncurry StgTopStringLit <$> stringLitsWithoutUnfolded
+    stringLits = uncurry StgTopStringLit <$> allStringLits
 
     (sunk, pgm''') = sinkPgm' m usedOnceIds $ traceDoc "<pgm'>" (map StgTopLifted) pgm''
 
@@ -154,5 +149,5 @@ topSortDecls _m binds = rest ++ nr'
         | otherwise = map node_payload (topologicalSortG g)
 
 
-traceDoc head m v = (DT.trace . (++) head . showSDocUnsafe . pprGenStgTopBindings shortStgPprOpts) (m v) v
-tracePpr head m v = (DT.trace . (++) head . showPprUnsafe) (m v) v
+traceDoc head m v = (DT_GHC.trace . (++) head . showSDocUnsafe . pprGenStgTopBindings shortStgPprOpts) (m v) v
+tracePpr head m v = (DT_GHC.pprTraceIt . (++) head . showPprUnsafe) (m v) v



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/251595d8a2cf80a9655f4e3e9d1a49e5434f7656...91765d8ecc525c1bf17e0be6b008d6b9af184501

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/251595d8a2cf80a9655f4e3e9d1a49e5434f7656...91765d8ecc525c1bf17e0be6b008d6b9af184501
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240919/5396b6d0/attachment-0001.html>


More information about the ghc-commits mailing list