[Git][ghc/ghc][wip/T24744] 12 commits: driver: Always link against "base" package when one shot linking

Serge S. Gulin (@gulin.serge) gitlab at gitlab.haskell.org
Tue Nov 26 15:10:23 UTC 2024



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


Commits:
7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00
driver: Always link against "base" package when one shot linking

The default value for base-unit-id is stored in the settings file.

At install time, this can be set by using the BASE_UNIT_ID environment
variable.

At runtime, the value can be set by `-base-unit-id` flag.

For whether all this is a good idea, see #25382

Fixes #25382

- - - - -
7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00
Compacting GC: Handle black holes in large objects.

As #14497 showed black holes can appear inside large objects when
we capture a computation and later blackhole it like we do for AP_STACK
closures.

Fixes #24791

- - - - -
291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00
ci: minor nix-in-docker improvements

This patch makes some minor improvements re nix-in-docker logic in the
ci configuration:

- Update `nixos/nix` to the latest version
- Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while
  allowing a reasonable degree of parallelism
- Remove redundant `--extra-experimental-features nix-command` in
  later `nix shell` invocations, it's already configured in
  `/etc/nix/nix.conf`

- - - - -
e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00
ci: avoid depending on stack job for test-bootstrap jobs

This patch makes test-bootstrap related ci jobs only depend on
hadrian-ghc-in-ghci job to finish, consistent with other jobs in the
full-build stage generated by gen_ci.hs. This allows the jobs to be
spawned earlier and improve overall pipeline parallelism.

- - - - -
caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00
Refactoring: Remove `pSupportedExts` from `ParserOpts`

This is never used for lexing / parsing.  It is only used by
`GHC.Parser.Header.getOptions`.

- - - - -
41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Add test for #25515

- - - - -
9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Desugar record notation with correct multiplicities

Simply uses the multiplicity as stored in the field. As I'm writing
this commit, the only possible multiplicity is 1, but !13525 is
changing this. It's actually easier to take !13525 into account.

Fixes #25515.

- - - - -
fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00
Clarify INLINE unfolding optimization docs.

Fixes #24660

- - - - -
88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00
rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack

This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin
to align it with aarch64-darwin. This allows us to get rid of the
horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing
linker warnings and testsuite failures on macOS 15. Fixes #25504.

- - - - -
ff23b86b by Serge S. Gulin at 2024-11-26T18:09:57+03:00
JS: Basic cleanup for unused stuff to simplify things.

1. Make `staticInitStat`, `staticDeclStat`, `allocUnboxedConStatic`, `allocateStaticList`, `jsStaticArg` local to modules.
2. Remove unused `hdRawStr`, `hdStrStr` from Haskell and JavaScript (`h$pstr`, `h$rstr`, `h$str`).
3. Introduce a special type `StaticAppKind` enumeration and `StaticApp` to represent boxed scalar static applications. Originally, StaticThunk supported to pass Maybe when it became Nothing for initializied thunks in an alternatie way but it is not used anymore.

- - - - -
8e6c75b1 by Serge S. Gulin at 2024-11-26T18:09:57+03:00
JS: Add trivial optimizations for `unpackCString` and `unpackCStringUtf8`.

It became possible due of introduction strings unfloating at Sinker pass (#13185). Earns few more bytes at optimizations.

- - - - -
c2f77764 by Serge S. Gulin at 2024-11-26T18:09:57+03:00
JS: Specialize unpackCString# CAFs (fixes #24744)

Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global".

Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations:
1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids.
2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/hello.hs
- .gitlab/jobs.yaml
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Parser.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs
- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/Ids.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Monad.hs
- compiler/GHC/StgToJS/Object.hs
- compiler/GHC/StgToJS/Symbols.hs
- compiler/GHC/StgToJS/Types.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Unit/State.hs
- distrib/configure.ac.in
- docs/users_guide/exts/pragmas.rst
- docs/users_guide/packages.rst
- ghc/GHCi/UI.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/59a558d7280723d4c6149ec331baca069f044f93...c2f77764c89258251733ecb51cbca82766ef6133

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/59a558d7280723d4c6149ec331baca069f044f93...c2f77764c89258251733ecb51cbca82766ef6133
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/20241126/e260d7e2/attachment.html>


More information about the ghc-commits mailing list