[Git][ghc/ghc][wip/decode_cloned_stack] 36 commits: Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage

Sven Tennie (@supersven) gitlab at gitlab.haskell.org
Sun Apr 9 15:24:24 UTC 2023



Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC


Commits:
8b092910 by Haskell-mouse at 2023-04-03T19:31:26-04:00
Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage

I've turned all occurrences of TcRnUnknownMessage in GHC.Rename.HsType
module into a proper TcRnMessage.
Instead, these TcRnMessage messages were introduced:

TcRnDataKindsError
TcRnUnusedQuantifiedTypeVar
TcRnIllegalKindSignature
TcRnUnexpectedPatSigType
TcRnSectionPrecedenceError
TcRnPrecedenceParsingError
TcRnIllegalKind
TcRnNegativeNumTypeLiteral
TcRnUnexpectedKindVar
TcRnBindMultipleVariables
TcRnBindVarAlreadyInScope

- - - - -
220a7a48 by Krzysztof Gogolewski at 2023-04-03T19:32:02-04:00
Fixes around unsafeCoerce#

1. `unsafeCoerce#` was documented in `GHC.Prim`. But since the overhaul
in 74ad75e87317, `unsafeCoerce#` is no longer defined there.
I've combined the documentation in `GHC.Prim` with the `Unsafe.Coerce` module.

2. The documentation of `unsafeCoerce#` stated that you should not
cast a function to an algebraic type, even if you later cast it back
before applying it. But ghci was doing that type of cast, as can be seen
with 'ghci -ddump-ds' and typing 'x = not'. I've changed it to use Any
following the documentation.

- - - - -
9095e297 by Matthew Craven at 2023-04-04T01:04:10-04:00
Add a few more memcpy-ish primops

* copyMutableByteArrayNonOverlapping#
* copyAddrToAddr#
* copyAddrToAddrNonOverlapping#
* setAddrRange#

The implementations of copyBytes, moveBytes, and fillBytes
in base:Foreign.Marshal.Utils now use these new primops,
which can cause us to work a bit harder generating code for them,
resulting in the metric increase in T21839c observed by CI on
some architectures.  But in exchange, we get better code!

Metric Increase:
    T21839c

- - - - -
f7da530c by Matthew Craven at 2023-04-04T01:04:10-04:00
StgToCmm: Upgrade -fcheck-prim-bounds behavior

Fixes #21054. Additionally, we can now check for range overlap
when generating Cmm for primops that use memcpy internally.

- - - - -
cd00e321 by sheaf at 2023-04-04T01:04:50-04:00
Relax assertion in varToRecFieldOcc

When using Template Haskell, it is possible to re-parent a field OccName
belonging to one data constructor to another data constructor. The
lsp-types package did this in order to "extend" a data constructor
with additional fields.

This ran into an assertion in 'varToRecFieldOcc'. This assertion
can simply be relaxed, as the resulting splices are perfectly sound.

Fixes #23220

- - - - -
eed0d930 by Sylvain Henry at 2023-04-04T11:09:15-04:00
GHCi.RemoteTypes: fix doc and avoid unsafeCoerce (#23201)

- - - - -
071139c3 by Ryan Scott at 2023-04-04T11:09:51-04:00
Make INLINE pragmas for pattern synonyms work with TH

Previously, the code for converting `INLINE <name>` pragmas from TH splices
used `vNameN`, which assumed that `<name>` must live in the variable namespace.
Pattern synonyms, on the other hand, live in the constructor namespace. I've
fixed the issue by switching to `vcNameN` instead, which works for both the
variable and constructor namespaces.

Fixes #23203.

- - - - -
7c16f3be by Krzysztof Gogolewski at 2023-04-04T17:13:00-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).

- - - - -
c165f079 by sheaf at 2023-04-04T17:13:40-04:00
Add testcase for #23192

This issue around solving of constraints arising from superclass
expansion using other constraints also borned from superclass expansion
was the topic of commit aed1974e. That commit made sure we don't emit
a "redundant constraint" warning in a situation in which removing the
constraint would cause errors.

Fixes #23192

- - - - -
d1bb16ed by Ben Gamari at 2023-04-06T03:40:45-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

- - - - -
04b80850 by Brandon Chinn at 2023-04-06T03:41:21-04:00
Fix reverse flag for -Wunsupported-llvm-version
- - - - -
0c990e13 by Pierre Le Marre at 2023-04-06T10:16:29+00:00
Add release note for GHC.Unicode refactor in base-4.18.

Also merge CLC proposal 130 in base-4.19 with CLC proposal 59 in
base-4.18 and add proper release date.

- - - - -
cbbfb283 by Alex Dixon at 2023-04-07T18:27:45-04:00
Improve documentation for ($) (#22963)

- - - - -
5193c2b0 by Alex Dixon at 2023-04-07T18:27:45-04:00
Remove trailing whitespace from ($) commentary

- - - - -
b384523b by Sebastian Graf at 2023-04-07T18:27:45-04:00
Adjust wording wrt representation polymorphism of ($)
- - - - -
6a788f0a by Torsten Schmits at 2023-04-07T22:29:28-04:00
Add structured error messages for GHC.Tc.TyCl.Utils

Tracking ticket: #20117

MR: !10251

This converts uses of `mkTcRnUnknownMessage` to newly added constructors
of `TcRnMessage`.

- - - - -
3ba77b36 by sheaf at 2023-04-07T22:30:07-04:00
Renamer: don't call addUsedGRE on an exact Name

When looking up a record field in GHC.Rename.Env.lookupRecFieldOcc,
we could end up calling addUsedGRE on an exact Name, which would then
lead to a panic in the bestImport function: it would be incapable of
processing a GRE which is not local but also not brought into scope
by any imports (as it is referred to by its unique instead).

Fixes #23240

- - - - -
3bb3013f by Sven Tennie at 2023-04-09T15:24:12+00:00
ghc-heap: Decode StgStack and its frames

Previously, ghc-heap could only decode heap closures.

The approach is explained in detail in note
[Decoding the stack].

- - - - -
a05e65b0 by Sven Tennie at 2023-04-09T15:24:12+00:00
Splitting StackFrames from Closures: Compiles

- - - - -
4a937757 by Sven Tennie at 2023-04-09T15:24:12+00:00
Fix tests

- - - - -
6df604f2 by Sven Tennie at 2023-04-09T15:24:12+00:00
Validate

- - - - -
3ab93797 by Sven Tennie at 2023-04-09T15:24:12+00:00
Remove unnecessary instances

- - - - -
b9934345 by Sven Tennie at 2023-04-09T15:24:12+00:00
Smaller diff

- - - - -
97cb9a06 by Sven Tennie at 2023-04-09T15:24:12+00:00
Add comment

- - - - -
5b7f3162 by Sven Tennie at 2023-04-09T15:24:12+00:00
Add comment

- - - - -
c41f7b6f by Sven Tennie at 2023-04-09T15:24:12+00:00
Add C function signatures to Cmm for readability

- - - - -
ca6f2e87 by Sven Tennie at 2023-04-09T15:24:12+00:00
Better assertion message

- - - - -
818cbf2f by Sven Tennie at 2023-04-09T15:24:12+00:00
More iterations to get more underflow frames

- - - - -
0de3fe37 by Sven Tennie at 2023-04-09T15:24:12+00:00
Rename

- - - - -
833bf9ec by Sven Tennie at 2023-04-09T15:24:12+00:00
getClosure returns Closure

- - - - -
3f099552 by Sven Tennie at 2023-04-09T15:24:13+00:00
getClosure: One WordOffset is enough

- - - - -
28f0ce24 by Sven Tennie at 2023-04-09T15:24:13+00:00
getWord: One offset is enough

- - - - -
598156d6 by Sven Tennie at 2023-04-09T15:24:13+00:00
decodeBitmaps: One offset is enough

- - - - -
f0bdc0b5 by Sven Tennie at 2023-04-09T15:24:13+00:00
Formatting, notes

- - - - -
574cd35a by Sven Tennie at 2023-04-09T15:24:13+00:00
Minimize diff

- - - - -
9887028d by Sven Tennie at 2023-04-09T15:24:13+00:00
Fix overloaded naming issues

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Name/Occurrence.hs
- compiler/GHC/Types/Name/Reader.hs
- docs/users_guide/using-warnings.rst
- libraries/base/Data/Array/Byte.hs
- libraries/base/Foreign/Marshal/Utils.hs
- libraries/base/GHC/Base.hs
- libraries/base/Unsafe/Coerce.hs
- libraries/base/changelog.md
- libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
- libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc
- + libraries/ghc-heap/GHC/Exts/Stack.hs
- + libraries/ghc-heap/GHC/Exts/Stack/Constants.hsc
- + libraries/ghc-heap/GHC/Exts/Stack/Decode.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7aa6a581a21544a442db1d68d7017ecddd8ae085...9887028dd014359f2013dfe67ca857ad4c0e1373

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7aa6a581a21544a442db1d68d7017ecddd8ae085...9887028dd014359f2013dfe67ca857ad4c0e1373
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/20230409/6e8eff83/attachment-0001.html>


More information about the ghc-commits mailing list