[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Fix FastString lexicographic ordering (fix #18562)
Marge Bot
gitlab at gitlab.haskell.org
Wed Sep 2 14:54:26 UTC 2020
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
884245dd by Sylvain Henry at 2020-09-01T12:39:36-04:00
Fix FastString lexicographic ordering (fix #18562)
- - - - -
4b4fbc58 by Sylvain Henry at 2020-09-01T12:39:36-04:00
Remove "Ord FastString" instance
FastStrings can be compared in 2 ways: by Unique or lexically. We don't
want to bless one particular way with an "Ord" instance because it leads
to bugs (#18562) or to suboptimal code (e.g. using lexical comparison
while a Unique comparison would suffice).
UTF-8 encoding has the advantage that sorting strings by their encoded
bytes also sorts them by their Unicode code points, without having to
decode the actual code points. BUT GHC uses Modified UTF-8 which
diverges from UTF-8 by encoding \0 as 0xC080 instead of 0x00 (to avoid
null bytes in the middle of a String so that the string can still be
null-terminated). This patch adds a new `utf8CompareShortByteString`
function that performs sorting by bytes but that also takes Modified
UTF-8 into account. It is much more performant than decoding the strings
into [Char] to perform comparisons (which we did in the previous patch).
Bump haddock submodule
- - - - -
b4edcde7 by Ben Gamari at 2020-09-01T14:53:42-04:00
testsuite: Add broken test for #18302
- - - - -
ecbb4ca2 by Sebastian Graf at 2020-09-02T10:54:10-04:00
Turn on -XMonoLocalBinds by default (#18430)
And fix the resulting type errors.
Co-authored-by: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Metric Decrease:
parsing001
- - - - -
4b83ba70 by David Feuer at 2020-09-02T10:54:12-04:00
Remove potential space leak from Data.List.transpose
Previously, `transpose` produced a list of heads
and a list of tails independently. This meant that
a function using only some heads, and only some tails,
could potentially leak space. Use `unzip` to work
around the problem by producing pairs and selector
thunks instead. Time and allocation behavior will
be worse, but there should be no more leak potential.
- - - - -
30ee2283 by Sylvain Henry at 2020-09-02T10:54:15-04:00
Remove outdated note
- - - - -
ab44b2ab by Sylvain Henry at 2020-09-02T10:54:17-04:00
Bignum: add missing compat import/export functions
- - - - -
30 changed files:
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Map.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Data/FastString.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Debug.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Runtime/Linker.hs
- compiler/GHC/SysTools.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Types/CostCentre.hs
- compiler/GHC/Types/Literal.hs
- compiler/GHC/Types/Name/Occurrence.hs
- compiler/GHC/Types/SrcLoc.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f81b58d9dd4f7999ade954eb95c6fcf680b50a7...ab44b2abcbbf85c681f0e578b6dffe20efbe2e98
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f81b58d9dd4f7999ade954eb95c6fcf680b50a7...ab44b2abcbbf85c681f0e578b6dffe20efbe2e98
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/20200902/33c1f733/attachment.html>
More information about the ghc-commits
mailing list