[Git][ghc/ghc][ghc-9.6] 15 commits: users guide: Note that base release notes are highlights of changelog

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue May 16 16:14:59 UTC 2023



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


Commits:
65023412 by Ben Gamari at 2023-05-11T12:49:10-04:00
users guide: Note that base release notes are highlights of changelog

- - - - -
e0f3aec8 by Simon Peyton Jones at 2023-05-15T18:34:25-04:00
Refactor the simplifier a bit to fix #22761

The core change in this commit, which fixes #22761, is that

* In a Core rule, ru_rhs is always occ-analysed.

This means adding a couple of calls to occurAnalyseExpr when
building a Rule, in
* GHC.Core.Rules.mkRule
* GHC.Core.Opt.Simplify.Iteration.simplRules

But diagosing the bug made me stare carefully at the code of the
Simplifier, and I ended up doing some only-loosely-related refactoring.

* I think that RULES could be lost because not every code path
  did addBndrRules

* The code around lambdas was very convoluted

It's mainly moving deck chairs around, but I like it more now.

(cherry picked from commit e45eb82830d6de4d09abb548e190be980dd001b4)

- - - - -
595edd68 by Josh Meredith at 2023-05-15T18:34:25-04:00
JS: Fix implementation of MK_JSVAL

(cherry picked from commit bab232795865e9abb82b75c7e72329778e23a345)

- - - - -
dc291c00 by Josh Meredith at 2023-05-15T18:34:25-04:00
JS: fix implementation of forceBool to use JS backend syntax

(cherry picked from commit 047e9d4f10e4124899887449dc52b9e72a7d3ea6)

- - - - -
3db2b31b by Sebastian Graf at 2023-05-15T18:34:26-04:00
Simplifier: `countValArgs` should not count Type args (#23102)

I observed miscompilations while working on !10088 caused by this.

Fixes #23102.

Metric Decrease:
    T10421

(cherry picked from commit 559a480427a841b5189f2e6a84a38b02a7c2b8a1)

- - - - -
4532771a by Alexis King at 2023-05-15T18:34:26-04:00
bytecode: Fix bitmaps for BCOs used to tag tuples and prim call args

fixes #23068

(cherry picked from commit bed3a292df532935426987e1f0c5eaa4f605407e)

- - - - -
f70b9c49 by Matthew Pickering at 2023-05-16T07:56:09-04:00
docs: Generate docs/index.html with version number

* Generate docs/index.html to include the version of the ghc library

* This also fixes the packageVersions interpolations which were
  - Missing an interpolation for `LIBRARY_ghc_VERSION`
  - Double quoting the version so that "9.7" was being inserted.

Fixes #23121

(cherry picked from commit d7a768a415c3bd575a20b20ae9a3953aa5886ed7)

- - - - -
6cd0f807 by Simon Peyton Jones at 2023-05-16T07:56:09-04:00
Transfer DFunId_ness onto specialised bindings

Whether a binding is a DFunId or not has consequences for the `-fdicts-strict`
flag, essentially if we are doing demand analysis for a DFunId then `-fdicts-strict` does
not apply because the constraint solver can create recursive groups of dictionaries.

In #22549 this was fixed for the "normal" case, see
Note [Do not strictify the argument dictionaries of a dfun].
However the loop still existed if the DFunId was being specialised.

The problem was that the specialiser would specialise a DFunId and
turn it into a VanillaId and so the demand analyser didn't know to
apply special treatment to the binding anymore and the whole recursive
group was optimised to bottom.

The solution is to transfer over the DFunId-ness of the binding in the specialiser so
that the demand analyser knows not to apply the `-fstrict-dicts`.

Fixes #22549

(cherry picked from commit 3b0ea4809d92581a10e0e501a6fbd7339e8922bf)

- - - - -
5637364e by Ben Gamari at 2023-05-16T07:56:09-04:00
nonmoving: Disable slop-zeroing

As noted in #23170, the nonmoving GC can race with a mutator zeroing the
slop of an updated thunk (in much the same way that two mutators would
race). Consequently, we must disable slop-zeroing when the nonmoving GC
is in use.

Closes #23170

(cherry picked from commit d1bb16ed3e18a4f41fcfe31f0bf57dbaf589d6c5)

- - - - -
373ec872 by Krzysztof Gogolewski at 2023-05-16T07:56:09-04:00
Fix unification with oversaturated type families

unify_ty was incorrectly saying that F x y ~ T x are surely apart,
where F x y is an oversaturated type family and T x is a tyconapp.
As a result, the simplifier dropped a live case alternative (#23134).

(cherry picked from commit 7c16f3be6e1ac92f87d752f12ad6c6e7b7fd6207)

- - - - -
ab677901 by Ben Gamari at 2023-05-16T07:56:09-04:00
nativeGen/AArch64: Fix bitmask immediate predicate

Previously the predicate for determining whether a logical instruction
operand could be encoded as a bitmask immediate was far too
conservative. This meant that, e.g., pointer untagged required five
instructions whereas it should only require one.

Fixes #23030.

(cherry picked from commit b8d783d24b9a617ad1e3038abeb75d322703ef65)

- - - - -
7083db5a by Sylvain Henry at 2023-05-16T07:56:09-04:00
JS: fix thread-related primops

(cherry picked from commit d442ac053f9ac7dbcc32318802daf686f377fe3d)

- - - - -
35131c9d by Ben Gamari at 2023-05-16T07:56:09-04:00
rts: Initialize Array# header in listThreads#

Previously the implementation of listThreads# failed to initialize the
header of the created array, leading to various nastiness.

Fixes #23071

(cherry picked from commit 52d3e9b4189440d26bad9c5a15f9420b67b1ca5b)

- - - - -
ac639721 by Ben Gamari at 2023-05-16T07:56:09-04:00
testsuite: Add test for #23071

(cherry picked from commit 1db30fe1dd38dd8ffedfadf3845706fcde02933b)

- - - - -
1fdbbd8d by sheaf at 2023-05-16T07:56:09-04:00
Don't panic in ltPatersonSize

The function GHC.Tc.Utils.TcType.ltPatersonSize would panic when it
encountered a type family on the RHS, as usually these are not allowed
(type families are not allowed on the RHS of class instances or of
quantified constraints). However, it is possible to still encounter
type families on the RHS after doing a bit of constraint solving, as
seen in test case T23171. This could trigger the panic in the call to
ltPatersonSize in GHC.Tc.Solver.Canonical.mk_strict_superclasses, which
is involved in avoiding loopy superclass constraints.

This patch simply changes ltPatersonSize to return "I don't know, because
there's a type family involved" in these cases.

Fixes #23171

(cherry picked from commit df1a581188694479a583270548896245fc23b525)

- - - - -


30 changed files:

- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Types/Id.hs
- docs/index.html → docs/index.html.in
- docs/users_guide/9.6.1-notes.rst
- hadrian/src/Rules/Documentation.hs
- hadrian/src/Rules/Generate.hs
- libraries/base/tests/all.T
- + libraries/base/tests/listThreads1.hs
- + libraries/base/tests/listThreads1.stdout
- rts/Threads.c
- rts/include/rts/storage/ClosureMacros.h
- rts/js/mem.js
- rts/js/thread.js
- + testsuite/tests/bytecode/T23068.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/40293d4eb0d56fff188b7bbdeb1eb55f40a8981b...1fdbbd8d81b3b5e80e8997d279764f62cdcc3c26

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/40293d4eb0d56fff188b7bbdeb1eb55f40a8981b...1fdbbd8d81b3b5e80e8997d279764f62cdcc3c26
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/20230516/8caf69b4/attachment-0001.html>


More information about the ghc-commits mailing list