[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: Migrate `Finder` component to `OsPath`, fixed #24616
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Jun 4 00:15:26 UTC 2024
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
c8ece0df by Fendor at 2024-06-03T19:43:22-04:00
Migrate `Finder` component to `OsPath`, fixed #24616
For each module in a GHCi session, we keep alive one `ModLocation`.
A `ModLocation` is fairly inefficiently packed, as `String`s are
expensive in memory usage.
While benchmarking the agda codebase, we concluded that we keep alive
around 11MB of `FilePath`'s, solely retained by `ModLocation`.
We provide a more densely packed encoding of `ModLocation`, by moving
from `FilePath` to `OsPath`. Further, we migrate the full `Finder`
component to `OsPath` to avoid unnecessary transformations.
As the `Finder` component is well-encapsulated, this requires only a
minimal amount of changes in other modules.
We introduce pattern synonym for 'ModLocation' which maintains backwards
compatibility and avoids breaking consumers of 'ModLocation'.
- - - - -
0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00
compiler: emit NaturallyAligned when element type & index type are the same width
This commit fixes a subtle mistake in alignmentFromTypes that used to
generate Unaligned when element type & index type are the same width.
Fixes #24930.
- - - - -
0bce5abf by Sebastian Graf at 2024-06-03T20:15:11-04:00
Parser: Remove unused `apats` rule
- - - - -
7fe5b7fc by David Knothe at 2024-06-03T20:15:11-04:00
Implement Or Patterns (#22596)
This commit introduces a new language extension, `-XOrPatterns`, as described in
GHC Proposal 522.
An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ...,
`patk` succeed, in this order.
See also the summary `Note [Implmentation of OrPatterns]`.
Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com>
- - - - -
ce8fb51e by Cheng Shao at 2024-06-03T20:15:14-04:00
compiler/ghci/rts: remove stdcall support completely
We have formally dropped i386 windows support (#18487) a long time
ago. The stdcall foreign call convention is only used by i386 windows,
and the legacy logic around it is a significant maintenance burden for
future work that adds arm64 windows support (#24603). Therefore, this
patch removes stdcall support completely from the compiler as well as
the RTS (#24883):
- stdcall is still recognized as a FFI calling convention in Haskell
syntax. GHC will now unconditionally emit a warning
(-Wunsupported-calling-conventions) and treat it as ccall.
- Apart from minimum logic to support the parsing and warning logic,
all other code paths related to stdcall has been completely stripped
from the compiler.
- ghci only supports FFI_DEFAULT_ABI and ccall convention from now on.
- FFI foreign export adjustor code on all platforms no longer handles
the stdcall case and only handles ccall from now on.
- The Win32 specific parts of RTS no longer has special code paths for
stdcall.
This commit is the final nail on the coffin for i386 windows support.
Further commits will perform more housecleaning to strip the legacy
code paths and pave way for future arm64 windows support.
- - - - -
4e0fea20 by Cheng Shao at 2024-06-03T20:15:14-04:00
rts: remove legacy i386 windows code paths
This commit removes some legacy i386 windows related code paths in the
RTS, given this target is no longer supported.
- - - - -
74c7d647 by Cheng Shao at 2024-06-03T20:15:14-04:00
autoconf: remove i386 windows related logic
This commit removes legacy i386 windows logic in autoconf scripts.
- - - - -
c1ba0d8d by Cheng Shao at 2024-06-03T20:15:14-04:00
llvm-targets: remove i386 windows support
This commit removes i386 windows from llvm-targets and the script to
generate it.
- - - - -
25430bf2 by Cheng Shao at 2024-06-03T20:15:14-04:00
libraries/utils: remove stdcall related legacy logic
This commit removes stdcall related legacy logic in libraries and
utils. ccall should be used uniformly for all supported windows hosts
from now on.
- - - - -
0d33f8f6 by Cheng Shao at 2024-06-03T20:15:14-04:00
testsuite: adapt the testsuite for stdcall removal
This patch adjusts test cases to handle the stdcall removal:
- Some stdcall usages are replaced with ccall since stdcall doesn't
make sense anymore.
- We also preserve some stdcall usages, and check in the expected
warning messages to ensure GHC always warn about stdcall usages
(-Wunsupported-calling-conventions) as expected.
- Error code testsuite coverage is slightly improved,
-Wunsupported-calling-conventions is now tested.
- Obsolete code paths related to i386 windows are also removed.
- - - - -
999637df by Cheng Shao at 2024-06-03T20:15:14-04:00
docs: minor adjustments for stdcall removal
This commit include minor adjustments of documentation related to
stdcall removal.
- - - - -
ba9d4e42 by Cheng Shao at 2024-06-03T20:15:14-04:00
docs: mention i386 Windows removal in 9.12 changelog
This commit mentions removal of i386 Windows support and stdcall
related change in the 9.12 changelog.
- - - - -
28de59e0 by Cheng Shao at 2024-06-03T20:15:15-04:00
hadrian: improve user settings documentation
This patch adds minor improvements to hadrian user settings documentation:
- Add missing `ghc.cpp.opts` case
- Remove non-existent `cxx` case
- Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't
- Add example of passing configure argument to autoconf packages
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- + compiler/GHC/Data/OsPath.hs
- compiler/GHC/Data/Strict.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config/Finder.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c3a56046193bca66ca43fa4f9c63801a019852d...28de59e030d258f55f6aa93bae6672605a9df144
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c3a56046193bca66ca43fa4f9c63801a019852d...28de59e030d258f55f6aa93bae6672605a9df144
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/20240603/7d142efe/attachment-0001.html>
More information about the ghc-commits
mailing list