[Git][ghc/ghc][wip/T24744] Alternate way "Enable static args"
Serge S. Gulin (@gulin.serge)
gitlab at gitlab.haskell.org
Mon Nov 25 18:21:06 UTC 2024
Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC
Commits:
0a380815 by Serge S. Gulin at 2024-11-25T21:20:53+03:00
Alternate way "Enable static args"
- - - - -
1 changed file:
- compiler/GHC/StgToJS/Monad.hs
Changes:
=====================================
compiler/GHC/StgToJS/Monad.hs
=====================================
@@ -173,6 +173,8 @@ globalOccs jst = do
let
cmp_cnt g1 g2 = compare (global_count g1) (global_count g2)
inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 }
+
+ go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc]
go gids = \case
[] -> -- return global Ids used locally sorted by increased use
L.sortBy cmp_cnt $ nonDetEltsUFM gids
@@ -184,6 +186,6 @@ globalOccs jst = do
-- add it to the list of already found global ids. Increasing
-- count by 1
let g = GlobalOcc gid 1
- in go (addToUFM_C inc gids i g) is
+ in go (addToUFM_C inc gids gid g) is
pure $ map global_id $ go emptyUFM $ identsS jst
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a3808150f0c2a0f6dc10560f943b77aca72ac52
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a3808150f0c2a0f6dc10560f943b77aca72ac52
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/20241125/9f055da5/attachment-0001.html>
More information about the ghc-commits
mailing list