[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: Add PrimCallConv support to GHCi

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Jan 18 19:54:04 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
b4c14c4b by Luite Stegeman at 2023-01-18T14:21:42-05:00
Add PrimCallConv support to GHCi

This adds support for calling Cmm code from bytecode using the native
calling convention, allowing modules that use `foreign import prim`
to be loaded and debugged in GHCi.

This patch introduces a new `PRIMCALL` bytecode instruction and
a helper stack frame `stg_primcall`. The code is based on the
existing functionality for dealing with unboxed tuples in bytecode,
which has been generalised to handle arbitrary calls.

Fixes #22051

- - - - -
d0a63ef8 by Adam Gundry at 2023-01-18T14:22:26-05:00
Refactor warning flag parsing to add missing flags

This adds `-Werror=<group>` and `-fwarn-<group>` flags for warning
groups as well as individual warnings. Previously these were defined
on an ad hoc basis so for example we had `-Werror=compat` but not
`-Werror=unused-binds`, whereas we had `-fwarn-unused-binds` but not
`-fwarn-compat`. Fixes #22182.

- - - - -
7ed1b8ef by Adam Gundry at 2023-01-18T14:22:26-05:00
Minor corrections to comments

- - - - -
5389681e by Adam Gundry at 2023-01-18T14:22:26-05:00
Revise warnings documentation in user's guide

- - - - -
ab0d5cda by Adam Gundry at 2023-01-18T14:22:26-05:00
Move documentation of deferred type error flags out of warnings section

- - - - -
e299dc07 by John Ericson at 2023-01-18T14:53:48-05:00
Give the RTS it's own configure script

Currently it doesn't do much anything, we are just trying to introduce
it without breaking the build. Later, we will move functionality from
the top-level configure script over to it.

We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to
facilitate and existing hack of skipping some configure checks for the
RTS we now need to skip just *part* not *all* of the "post configure"
hook, as running the configure script (which we definitely want to do)
is also implemented as part of the "post configure" hook. But doing this
requires exposing functionality that wasn't exposed before.

- - - - -
8505a6fc by Bodigrim at 2023-01-18T14:53:50-05:00
ghc package does not have to depend on terminfo

- - - - -
469db33a by Bodigrim at 2023-01-18T14:53:50-05:00
ghc-pkg does not have to depend on terminfo

- - - - -
9e079950 by Ben Gamari at 2023-01-18T14:53:51-05:00
nativeGen/X86: MFENCE is unnecessary for release semantics

In #22764 a user noticed that a program implementing a simple atomic
counter via an STRef regressed significantly due to the introduction of
necessary atomic operations in the MutVar# primops (#22468). This
regression was caused by a bug in the NCG, which emitted an unnecessary
MFENCE instruction for a release-ordered atomic write. MFENCE is rather
only needed to achieve sequentially consistent ordering.

Fixes #22764.

- - - - -
7679ebc6 by Ryan Scott at 2023-01-18T14:53:52-05:00
Add regression test for #22151

Issue #22151 was coincidentally fixed in commit
aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy
superclass dicts`). This adds a regression test to ensure that the issue
remains fixed.

Fixes #22151.

- - - - -
20d296f1 by Andrei Borzenkov at 2023-01-18T14:53:56-05:00
Fix printing of promoted MkSolo datacon (#22785)

Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo,
and Solo was turned into a pattern synonym for backwards compatibility.
Since pattern synonyms can not be promoted, the old code that pretty-printed
promoted single-element tuples started producing ill-typed code:
   t :: Proxy ('Solo Int)
This fails with "Pattern synonym ‘Solo’ used as a type"

The solution is to track the distinction between type constructors and data
constructors more carefully when printing single-element tuples.

- - - - -


30 changed files:

- boot
- cabal.project-reinstall
- compiler/GHC/Builtin/Types.hs-boot
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CallConv.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Reg.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/SysTools/Terminal.hs
- compiler/GHC/Types/Error.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.6.1-notes.rst
- docs/users_guide/exts/defer_type_errors.rst
- docs/users_guide/using-warnings.rst
- hadrian/src/Base.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Lint.hs
- hadrian/src/Rules/Register.hs
- hadrian/src/Rules/SourceDist.hs
- hadrian/src/Rules/ToolArgs.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ba7f89b1571e132f59b4b9ee77b7dc8e7f43f39d...20d296f131b44b8e524d59330bfb6536ee701068

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ba7f89b1571e132f59b4b9ee77b7dc8e7f43f39d...20d296f131b44b8e524d59330bfb6536ee701068
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/20230118/dd6294a4/attachment.html>


More information about the ghc-commits mailing list