[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: interfaces: Ensure that forceModIface deeply forces a ModIface
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Mar 14 12:11:41 UTC 2025
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
915a6781 by Matthew Pickering at 2025-03-13T01:46:41-04:00
interfaces: Ensure that forceModIface deeply forces a ModIface
A ModIface is the result of compilation that we keep for a long time in
memory. Therefore, it's very important to manage what we are going to
retain and remove any external references to things which we might have
captured compilation.
If storing your ModIface in memory uses too much space, then store
less things or make it use a more efficient representation.
In the past there have been many space leak bugs by not sufficiently
forcing a ModIface (#15111)
This patch adds all the missing NFData instances for all the places I
could find where we weren't deeply forcing the structure.
- - - - -
24d373a6 by Matthew Craven at 2025-03-13T01:47:18-04:00
Add interface-stability test for ghc-prim
- - - - -
abbfcd5e by sheaf at 2025-03-14T08:11:29-04:00
Don't report used duplicate record fields as unused
This commit fixes the bug reported in #24035 in which the import of a
duplicate record field could be erroneously reported as unused.
The issue is that an import of the form "import M (fld)" can import
several different 'Name's, and we should only report an error if ALL
of those 'Name's are unused, not if ANY are.
Note [Reporting unused imported duplicate record fields]
in GHC.Rename.Names explains the solution to this problem.
Fixes #24035
- - - - -
c3b77039 by Matthew Pickering at 2025-03-14T08:11:29-04:00
binary: Directly copy ShortByteString to buffer rather than go via ByteString
This avoids allocating an intermediate bytestring. I just noticed on a
profile that `putFS` was allocating, and it seemed strange to me why
since it should just copy the contents of the FastString into the
already allocated buffer. It turned out we were going indirectly via a
ByteString.
Fixes #25861
- - - - -
47 changed files:
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Data/Strict.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Iface/Recomp/Types.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Types/Annotations.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/CostCentre.hs
- compiler/GHC/Types/CostCentre/State.hs
- compiler/GHC/Types/ForeignCall.hs
- compiler/GHC/Types/GREInfo.hs
- compiler/GHC/Types/Literal.hs
- compiler/GHC/Types/SourceFile.hs
- compiler/GHC/Types/SrcLoc.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Utils/Binary.hs
- compiler/Language/Haskell/Syntax/Basic.hs
- compiler/Language/Haskell/Syntax/Type.hs
- compiler/Language/Haskell/Syntax/Type.hs-boot
- libraries/ghc-boot/GHC/Serialized.hs
- testsuite/tests/deriving/should_compile/T17324.stderr
- testsuite/tests/interface-stability/README.mkd
- testsuite/tests/interface-stability/all.T
- + testsuite/tests/interface-stability/ghc-prim-exports.stdout
- + testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/module/T11970A.stderr
- testsuite/tests/module/mod176.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
- testsuite/tests/rename/should_compile/T14881.stderr
- + testsuite/tests/rename/should_compile/T24035.hs
- + testsuite/tests/rename/should_compile/T24035_aux.hs
- + testsuite/tests/rename/should_compile/T24035b.hs
- + testsuite/tests/rename/should_compile/T24035b.stderr
- testsuite/tests/rename/should_compile/all.T
- utils/dump-decls/Main.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5346c9c653dc5a65f3f476956ac18ed21af3049c...c3b770390fee5cc9c170e745b6c513a4aa67868b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5346c9c653dc5a65f3f476956ac18ed21af3049c...c3b770390fee5cc9c170e745b6c513a4aa67868b
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/20250314/a7cff15a/attachment.html>
More information about the ghc-commits
mailing list