[Git][ghc/ghc][wip/andreask/ghci-tag-nullary] 6 commits: Add standard Unicode case predicates isUpperCase and isLowerCase.

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Mon Oct 17 15:10:33 UTC 2022



Andreas Klebinger pushed to branch wip/andreask/ghci-tag-nullary at Glasgow Haskell Compiler / GHC


Commits:
43ab435a by Pierre Le Marre at 2022-10-14T07:45:43-04:00
Add standard Unicode case predicates isUpperCase and isLowerCase.

These predicates use the standard Unicode case properties and are more intuitive than isUpper and isLower.

Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/90#issuecomment-1276649403.

Fixes #14589

- - - - -
aec5a443 by Bodigrim at 2022-10-14T07:46:21-04:00
Add type signatures in where-clause of Data.List.permutations

The type of interleave' is very much revealing, otherwise it's extremely tough to decipher.

- - - - -
ee0deb80 by Ben Gamari at 2022-10-14T18:29:20-04:00
rts: Use pthread_setname_np correctly on Darwin

As noted in #22206, pthread_setname_np on Darwin only supports
setting the name of the calling thread. Consequently we must introduce
a trampoline which first sets the thread name before entering the thread
entrypoint.
- - - - -
8eff62a4 by Ben Gamari at 2022-10-14T18:29:57-04:00
testsuite: Add test for #22282

This will complement mpickering's more general port of foundation's
numerical testsuite, providing a test for the specific case found
in #22282.

- - - - -
62a55001 by Ben Gamari at 2022-10-14T18:29:57-04:00
ncg/aarch64: Fix sub-word sign extension yet again

In adc7f108141a973b6dcb02a7836eed65d61230e8 we fixed a number of issues
to do with sign extension in the AArch64 NCG found by ghc/test-primops>.
However, this patch made a critical error, assuming that getSomeReg
would allocate a fresh register for the result of its evaluation.
However, this is not the case as `getSomeReg (CmmReg r) == r`.
Consequently, any mutation of the register returned by `getSomeReg` may
have unwanted side-effects on other expressions also mentioning `r`. In
the fix listed above, this manifested as the registers containing the
operands of binary arithmetic operations being incorrectly
sign-extended. This resulted in #22282.

Sadly, the rather simple structure of the tests generated
by `test-primops` meant that this particular case was not exercised.
Even more surprisingly, none of our testsuite caught this case.

Here we fix this by ensuring that intermediate sign extension is
performed in a fresh register.

Fixes #22282.

- - - - -
046b93fd by Andreas Klebinger at 2022-10-17T15:10:31+00:00
Fix GHCis interaction with tag inference.

I had assumed that wrappers were not inlined in interactive mode.
Meaning we would always execute the compiled wrapper which properly
takes care of upholding the strict field invariant.
This turned out to be wrong. So instead we now run tag inference even
when we generate bytecode. In that case only for correctness not
performance reasons although it will be still beneficial for runtime
in some cases.

I further fixed a bug where GHCi didn't tag nullary constructors
properly when used as arguments. Which caused segfaults when calling
into compiled functions which expect the strict field invariant to
be upheld.

Fixes #22042 and #21083

-------------------------
Metric Increase:
    T4801

Metric Decrease:
    T13035
-------------------------

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Types.hs
- compiler/GHC/Types/Name/Set.hs
- docs/users_guide/9.6.1-notes.rst
- libraries/base/Data/Char.hs
- libraries/base/Data/OldList.hs
- libraries/base/GHC/Unicode.hs
- + libraries/base/GHC/Unicode/Internal/Char/DerivedCoreProperties.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/tests/unicode001.hs
- libraries/base/tests/unicode001.stdout
- libraries/base/tools/ucd2haskell/exe/Parser/Text.hs
- libraries/base/tools/ucd2haskell/tests/check_all_chars.py
- libraries/base/tools/ucd2haskell/tests/export_all_chars.hs
- libraries/base/tools/ucd2haskell/ucd.sh
- rts/posix/OSThreads.c
- testsuite/tests/ghci.debugger/scripts/T12458.stdout
- testsuite/tests/ghci.debugger/scripts/print018.stdout
- + testsuite/tests/numeric/should_run/T22282.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2c5ac51ffeb84312a8b63f61a9d34f3e443054ce...046b93fd86980e3bc0e4514c15589d9a580aee6d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2c5ac51ffeb84312a8b63f61a9d34f3e443054ce...046b93fd86980e3bc0e4514c15589d9a580aee6d
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/20221017/e97e2c0f/attachment.html>


More information about the ghc-commits mailing list