[Git][ghc/ghc][wip/backports-9.6] 7 commits: Make GHC.Types.Id.Make.shouldUnpackTy a bit more clever
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu May 18 20:00:48 UTC 2023
Ben Gamari pushed to branch wip/backports-9.6 at Glasgow Haskell Compiler / GHC
Commits:
48da24c9 by Simon Peyton Jones at 2023-05-18T16:00:10-04:00
Make GHC.Types.Id.Make.shouldUnpackTy a bit more clever
As #23307, GHC.Types.Id.Make.shouldUnpackTy was leaving money on the
table, failing to unpack arguments that are perfectly unpackable.
The fix is pretty easy; see Note [Recursive unboxing]
(cherry picked from commit 902f0730b4c50f39b7767a346be324c98bf7a8a6)
- - - - -
74b8e5bd by Alexis King at 2023-05-18T16:00:10-04:00
Use a uniform return convention in bytecode for unary results
fixes #22958
(cherry picked from commit d85ed900b271109185251cb0494d51048a4cf213)
- - - - -
4949111f by Alexis King at 2023-05-18T16:00:10-04:00
hadrian: Fix linker script flag for MergeObjects builder
This fixes what appears to have been a typo in !9530. The `-t` flag just
enables tracing on all versions of `ld` I’ve looked at, while `-T` is
used to specify a linker script. It seems that this worked anyway for
some reason on some `ld` implementations (perhaps because they
automatically detect linker scripts), but the missing `-T` argument
causes `gold` to complain.
(cherry picked from commit 59aa4676a49b4f9d09c1cd3cc3b47c3c54b6ed80)
- - - - -
27086298 by Krzysztof Gogolewski at 2023-05-18T16:00:10-04:00
Fix coercion optimisation for SelCo (#23362)
setNominalRole_maybe is supposed to output a nominal coercion.
In the SelCo case, it was not updating the stored role to Nominal,
causing #23362.
(cherry picked from commit d683b2e5b91a39a2bf16796f5800f605a0281004)
- - - - -
5bd85c7d by Ben Gamari at 2023-05-18T16:00:10-04:00
hadrian: Fix mention of non-existent removeFiles function
Previously Hadrian's bindist Makefile referred to a `removeFiles`
function that was previously defined by the `make` build system. Since
the `make` build system is no longer around, this function is now
undefined. Naturally, make being make, this appears to be silently
ignored instead of producing an error.
Fix this by rewriting it to `rm -f`.
Closes #23373.
(cherry picked from commit c6cf9433e3d41e239265eaeff0fd02e6b45d5427)
- - - - -
7607986e by sheaf at 2023-05-18T16:00:10-04:00
Don't panic in mkNewTyConRhs
This function could come across invalid newtype constructors, as we
only perform validity checking of newtypes once we are outside the
knot-tied typechecking loop.
This patch changes this function to fake up a stub type in the case of
an invalid newtype, instead of panicking.
This patch also changes "checkNewDataCon" so that it reports as many
errors as possible at once.
Fixes #23308
(cherry picked from commit c176ad1835ccfe55e2bde875b4a35e9d226ff657)
- - - - -
eaadcaa7 by Ryan Scott at 2023-05-18T16:00:10-04:00
Fix type variable substitution in gen_Newtype_fam_insts
Previously, `gen_Newtype_fam_insts` was substituting the type variable binders
of a type family instance using `substTyVars`, which failed to take type
variable dependencies into account. There is similar code in
`GHC.Tc.TyCl.Class.tcATDefault` that _does_ perform this substitution properly,
so this patch:
1. Factors out this code into a top-level `substATBndrs` function, and
2. Uses `substATBndrs` in `gen_Newtype_fam_insts`.
Fixes #23329.
(cherry picked from commit e8b72ff6e4aee1f889a9168df57bb1b00168fd21)
- - - - -
30 changed files:
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Types/Id/Make.hs
- hadrian/bindist/Makefile
- hadrian/src/Settings/Builders/SplitSections.hs
- rts/Disassembler.c
- rts/Interpreter.c
- rts/Printer.c
- rts/StgMiscClosures.cmm
- rts/include/rts/Bytecodes.h
- rts/include/stg/MiscClosures.h
- + testsuite/tests/deriving/should_compile/T23329.hs
- + testsuite/tests/deriving/should_compile/T23329_M.hs
- testsuite/tests/deriving/should_compile/all.T
- + testsuite/tests/ghci/should_run/T22958a.hs
- + testsuite/tests/ghci/should_run/T22958a.stdout
- + testsuite/tests/ghci/should_run/T22958b.hs
- + testsuite/tests/ghci/should_run/T22958b.stdout
- testsuite/tests/ghci/should_run/all.T
- + testsuite/tests/simplCore/should_compile/T23307.hs
- + testsuite/tests/simplCore/should_compile/T23307.stderr
- + testsuite/tests/simplCore/should_compile/T23307a.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/572b711a0d994361a06c0595dbe0698f16100481...eaadcaa7ca2b7bb1d4d214339092dd9e6df12a96
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/572b711a0d994361a06c0595dbe0698f16100481...eaadcaa7ca2b7bb1d4d214339092dd9e6df12a96
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/20230518/b4d2b4e9/attachment-0001.html>
More information about the ghc-commits
mailing list