[Git][ghc/ghc][ghc-9.8] 15 commits: Bump Cabal to 3.10.3.0

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Sat Oct 12 19:56:32 UTC 2024



Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC


Commits:
c4412f8d by Ben Gamari at 2024-10-10T16:11:51-04:00
Bump Cabal to 3.10.3.0

Bumps Cabal submodule.

- - - - -
f52257b8 by Ben Gamari at 2024-10-10T16:11:55-04:00
Bump directory to 1.3.8.5

Bumps directory submodule.

- - - - -
26f300dc by Matthew Pickering at 2024-10-10T16:11:55-04:00
Compatibility with 9.8.1 as boot compiler

This fixes several compatability issues when using 9.8.1 as the boot
compiler.

* An incorrect version guard on the stack decoding logic in ghc-heap
* Some ghc-prim bounds need relaxing
* ghc is no longer wired in, so we have to remove the -this-unit-id ghc
  call.

Fixes #24077

(cherry picked from commit ef3d20f83499cf129b1cacac07906b8d6188fc17)

- - - - -
44e119c9 by Andreas Klebinger at 2024-10-10T16:11:55-04:00
NCG: Fix a bug in jump shortcutting.

When checking if a jump has more than one destination account for the
possibility of some jumps not being representable by a BlockId.

We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing
represents non-BlockId jump destinations.

Fixes #24507

(cherry picked from commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66)

- - - - -
f97d7fdf by Ben Gamari at 2024-10-10T16:11:55-04:00
hadrian/bindist: Ensure that phony rules are marked as such

Otherwise make may not run the rule if file with the same name as the
rule happens to exist.

(cherry picked from commit d04f384f35b76a6865dfb3b17098ef69563b3779)

- - - - -
3dc62f2e by Matthew Pickering at 2024-10-11T11:16:35-04:00
Fix haddock source links and hyperlinked source

There were a few issues with the hackage links:

1. We were using the package id rather than the package name for the
   package links. This is fixed by now allowing the template to mention
   %pkg% or %pkgid% and substituing both appropiatly.
2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage`
   as the new base link works on a local or remote hackage server.
3. The "src" path including too much stuff, so cross-package source
   links were broken as the template was getting double expanded.

Fixes #24086

(cherry picked from commit 23f2a478b7dc6b61cab86cf7d0db7fec8a6d9a1f)

- - - - -
3a033e29 by Rodrigo Mesquita at 2024-10-11T11:16:35-04:00
rts: free error message before returning

Fixes a memory leak in rts/linker/PEi386.c

(cherry picked from commit dd530bb7e22e953e4cec64a5fd6c39fddc152c6f)

- - - - -
20f80b77 by Cheng Shao at 2024-10-11T11:16:35-04:00
rts: add missing ccs_mutex guard to internal_dlopen

See added comment for details. Closes #24423.

- - - - -
2166d290 by Ben Gamari at 2024-10-11T11:16:35-04:00
rts/linker: Don't unload native objects when dlinfo isn't available

To do so is unsafe as we have no way of identifying references to
symbols provided by the object.

Fixes #24513. Fixes #23993.

- - - - -
fc1dcd02 by Alexis King at 2024-10-11T11:16:35-04:00
linker: Avoid linear search when looking up Haskell symbols via dlsym

See the primary Note [Looking up symbols in the relevant objects] for a
more in-depth explanation.

When dynamically loading a Haskell symbol (typical when running a splice or
GHCi expression), before this commit we would search for the symbol in
all dynamic libraries that were loaded. However, this could be very
inefficient when too many packages are loaded (which can happen if there are
many package dependencies) because the time to lookup the would be
linear in the number of packages loaded.

This commit drastically improves symbol loading performance by
introducing a mapping from units to the handles of corresponding loaded
dlls. These handles are returned by dlopen when we load a dll, and can
then be used to look up in a specific dynamic library.

Looking up a given Name is now much more precise because we can get
lookup its unit in the mapping and lookup the symbol solely in the
handles of the dynamic libraries loaded for that unit.

In one measurement, the wait time before the expression was executed
went from +-38 seconds down to +-2s.

This commit also includes Note [Symbols may not be found in pkgs_loaded],
explaining the fallback to the old behaviour in case no dll can be found
in the unit mapping for a given Name.

Fixes #23415

Co-authored-by: Rodrigo Mesquita (@alt-romes)
(cherry picked from commit e008a19a7f9e8f22aada0b4e1049744f49d39aad)

- - - - -
9d1ecdb9 by Ben Gamari at 2024-10-11T11:16:35-04:00
hadrian: Update bootstrap plans

- - - - -
1413e1dd by Rodrigo Mesquita at 2024-10-11T11:16:35-04:00
rts: Make addDLL a wrapper around loadNativeObj

Rewrite the implementation of `addDLL` as a wrapper around the more
principled `loadNativeObj` rts linker function. The latter should be
preferred while the former is preserved for backwards compatibility.

`loadNativeObj` was previously only available on ELF platforms, so this
commit further refactors the rts linker to transform loadNativeObj_ELF
into loadNativeObj_POSIX, which is available in ELF and MachO platforms.

The refactor made it possible to remove the `dl_mutex` mutex in favour
of always using `linker_mutex` (rather than a combination of both).

Lastly, we implement `loadNativeObj` for Windows too.

(cherry picked from commit dcfaa190e1e1182a2efe4e2f601affbb832a49bb)

- - - - -
54a48fa8 by Rodrigo Mesquita at 2024-10-11T18:33:02-04:00
Use symbol cache in internal interpreter too

This commit makes the symbol cache that was used by the external
interpreter available for the internal interpreter too.

This follows from the analysis in #23415 that suggests the internal
interpreter could benefit from this cache too, and that there is no good
reason not to have the cache for it too. It also makes it a bit more
uniform to have the symbol cache range over both the internal and
external interpreter.

This commit also refactors the cache into a function which is used by
both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the
caching logic to `lookupSymbolInDLL` too.

- - - - -
2eb97a8c by Ben Gamari at 2024-10-12T11:39:11-04:00
Bump process submodule to v1.6.25.0

(cherry picked from commit 18f532f3ed021fff9529f50da2006b8a8d8b1df7)

- - - - -
20157588 by Ben Gamari at 2024-10-12T11:39:11-04:00
testsuite: Tests broken due to #22349 are fixed

- - - - -


30 changed files:

- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
- compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Runtime/Interpreter/Types.hs
- hadrian/README.md
- hadrian/bindist/Makefile
- hadrian/bootstrap/generate_bootstrap_plans
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/Haddock.hs
- hadrian/src/Settings/Packages.hs
- libraries/Cabal
- libraries/directory
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/ObjLink.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3d90849d00871853c68dbb7b9b4e97349a999459...2015758896e9c163e6b6952142556dc1838c02ba

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3d90849d00871853c68dbb7b9b4e97349a999459...2015758896e9c163e6b6952142556dc1838c02ba
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/20241012/33b94941/attachment-0001.html>


More information about the ghc-commits mailing list