[Git][ghc/ghc][ghc-9.6] 12 commits: Disable unfolding sharing for interface files with core definitions

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Wed Feb 8 06:59:43 UTC 2023



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


Commits:
cbd60c81 by Matthew Pickering at 2023-02-07T19:27:16-05:00
Disable unfolding sharing for interface files with core definitions

Ticket #22807 pointed out that the RHS sharing was not compatible with
-fignore-interface-pragmas because the flag would remove unfoldings from
identifiers before the `extra-decls` field was populated.

For the 9.6 timescale the only solution is to disable this sharing,
which will make interface files bigger but this is acceptable for the
first release of `-fwrite-if-simplified-core`.

For 9.8 it would be good to fix this by implementing #20056 due to the
large number of other bugs that would fix.

I also improved the error message in tc_iface_binding to avoid the "no match
in record selector" error but it should never happen now as the entire
sharing logic is disabled.

Also added the currently broken test for #22807 which could be fixed by
!6080

Fixes #22807

(cherry picked from commit 0ada454703560b733fe3c920b87496ac1238c29e)

- - - - -
18942043 by Bodigrim at 2023-02-07T19:27:23-05:00
Bump submodule containers to 0.6.7

Metric Decrease:
    ManyConstructors
    T10421
    T12425
    T12707
    T13035
    T13379
    T15164
    T1969
    T783
    T9198
    T9961
    WWRec

(cherry picked from commit 3135819847aae0cdcc6c2fca4a2234fcfed1db93)

- - - - -
86698692 by Andreas Klebinger at 2023-02-07T19:27:30-05:00
Fix CallerCC potentially shadowing other cost centres.

Add a CallerCC cost centre flavour for cost centres added by the
CallerCC pass. This avoids potential accidental shadowing between
CCs added by user annotations and ones added by CallerCC.

(cherry picked from commit bf3f88a1a5b23bdf304baca473c3ee797c5f86bd)

- - - - -
c6c96a3a by Ben Gamari at 2023-02-07T19:27:36-05:00
Revert "Use fix-sized bit-fiddling primops for fixed size boxed types"

This reverts commit 4512ad2d6a8e65ea43c86c816411cb13b822f674.

This was never applied to master/9.6 originally.

(cherry picked from commit a44bdc2720015c03d57f470b759ece7fab29a57a)
(cherry picked from commit 25537dfda4ae59bc0321b229ca9ff924ef64d1fa)

- - - - -
51397a53 by Bodigrim at 2023-02-07T19:27:42-05:00
Fix colors in emacs terminal

(cherry picked from commit 5a54ac0b2b915889950c83e04bf1beb08631891e)

- - - - -
2c7f85fe by Ryan Scott at 2023-02-07T19:27:58-05:00
Windows: Remove mingwex dependency

The clang based toolchain uses ucrt as its math library
and so mingwex is no longer needed.  In fact using mingwex
will cause incompatibilities as the default routines in both
have differing ULPs and string formatting modifiers.

```
$ LIBRARY_PATH=/mingw64/lib ghc/_build/stage1/bin/ghc Bug.hs -fforce-recomp && ./Bug.exe
[1 of 2] Compiling Main             ( Bug.hs, Bug.o )
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__imp___p__environ'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__hscore_get_errno'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziError_errnoToIOError_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziWindows_failIf2_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePageziAPI_mkCodePageEncoding_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePage_currentCodePage_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncoding_getForeignEncoding_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziString_withCStringLen1_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziInternals_zdwflushCharReadBuffer_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziText_hGetBuf1_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziFingerprint_fingerprintString_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_DataziTypeableziInternal_mkTrCon_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziException_errorCallWithCallStackException_closure'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziErr_error_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `base_DataziMaybe_fromJust1_info'
ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `templatezmhaskell_LanguageziHaskellziTHziSyntax_IntPrimL_con_info'
ghc.exe: ^^ Could not load 'templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure', dependency unresolved. See top entry above.

<no location info>: error:

GHC.ByteCode.Linker.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
  templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
  https://www.haskell.org/ghc/reportabug
```

(cherry picked from commit de1d15127ac3f41ac3044215b0ea3398a36edc89)

- - - - -
81873448 by Tamar Christina at 2023-02-07T19:27:59-05:00
linker: Fix BFD import libraries

This commit fixes the BFD style import library support in the runtime
linker.  This was accidentally broken during the refactoring to clang
and went unnoticed because clang itself is unable to generate the BFD
style import libraries.

With this change we can not link against both GCC or Clang produced
libraries again and intermix code produced by both compilers.

(cherry picked from commit 48e391952c17ff7eab10b0b1456e3f2a2af28a9b)

- - - - -
18d1c5f9 by Ben Gamari at 2023-02-07T19:29:38-05:00
Bump Windows toolchain

Updates to LLVM 14, hopefully fixing #21964.

(cherry picked from commit b2bb3e62275cc1d9e00a2d5ed511843192133ed5)

- - - - -
2ec1c359 by Luite Stegeman at 2023-02-07T19:29:54-05:00
Fix marking async exceptions in the JS backend

Async exceptions are posted as a pair of the exception and
the thread object. This fixes the marking pass to correctly
follow the two elements of the pair.

Potentially fixes #22836

(cherry picked from commit 77a8234c5d284846e18c0a44ba5ee196059aaea6)

- - - - -
8ab4d956 by sheaf at 2023-02-07T19:30:16-05:00
Don't allow . in overloaded labels

This patch removes . from the list of allowed characters in a non-quoted
overloaded label, as it was realised this steals syntax, e.g. (#.).

Users who want this functionality will have to add quotes around the
label, e.g. `#"17.28"`.

Fixes #22821

(cherry picked from commit b17fb3d96bd2e9f3bf96392f3b3b3e0aed7fe276)

- - - - -
dce53f5c by Ben Gamari at 2023-02-07T19:30:22-05:00
Revert "Use fix-sized equality primops for fixed size boxed types"

This reverts commit 024020c38126f3ce326ff56906d53525bc71690c.

This was never applied to master/9.6 originally.

See #20405 for why using these primops is a bad idea.

(cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865)
(cherry picked from commit 929161943f19e1673288adc83d165ddc99865798)

- - - - -
bafa3899 by Sylvain Henry at 2023-02-07T19:37:15-05:00
JS: replace "js" architecture with "javascript"

Despite Cabal supporting any architecture name, `cabal --check` only
supports a few built-in ones. Sadly `cabal --check` is used by Hackage
hence using any non built-in name in a package (e.g. `arch(js)`) is
rejected and the package is prevented from being uploaded on Hackage.

Luckily built-in support for the `javascript` architecture was added for
GHCJS a while ago. In order to allow newer `base` to be uploaded on
Hackage we make the switch from `js` to `javascript` architecture.

Fixes #22740.

Co-authored-by: Ben Gamari <ben at smart-cactus.org>
(cherry picked from commit 6636b670233522f01d002c9b97827d00289dbf5c)

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Core/LateCC.hs
- compiler/GHC/Core/Opt/CallerCC.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/SysTools/Terminal.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Types/CostCentre.hs
- config.sub
- configure.ac
- docs/users_guide/9.6.1-notes.rst
- hadrian/bindist/config.mk.in
- hadrian/cfg/system.config.in
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Settings/Packages.hs
- libraries/base/Control/Concurrent.hs
- libraries/base/GHC/Conc/IO.hs
- libraries/base/GHC/Conc/Windows.hs
- libraries/base/GHC/Event.hs
- libraries/base/GHC/Event/Thread.hs
- libraries/base/GHC/Event/TimerManager.hs
- libraries/base/GHC/IO/Encoding.hs
- libraries/base/GHC/IO/Encoding/CodePage/API.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/30d3c8271b867ff9d6c2514632632b9483a09056...bafa389975872e1dec6925e05ee0efc349656110

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/30d3c8271b867ff9d6c2514632632b9483a09056...bafa389975872e1dec6925e05ee0efc349656110
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/20230208/1969580b/attachment-0001.html>


More information about the ghc-commits mailing list