[Git][ghc/ghc][wip/mp-backports-batch-2] 5 commits: Improve treatment of type applications in patterns
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Feb 9 17:22:10 UTC 2023
Ben Gamari pushed to branch wip/mp-backports-batch-2 at Glasgow Haskell Compiler / GHC
Commits:
fcdf9f9b by Simon Peyton Jones at 2023-02-09T11:48:52-05:00
Improve treatment of type applications in patterns
This patch fixes a subtle bug in the typechecking of type
applications in patterns, e.g.
f (MkT @Int @a x y) = ...
See Note [Type applications in patterns] in GHC.Tc.Gen.Pat.
This fixes #19847, #22383, #19577, #21501
(cherry picked from commit 9f95db54e38b21782d058043abe42fd77abfb9ad)
- - - - -
bea77fc4 by Andreas Klebinger at 2023-02-09T12:05:36-05:00
Fix some correctness issues around tag inference when targeting the bytecode generator.
* Let binders are now always assumed untagged for bytecode.
* Imported referenced are now always assumed to be untagged for bytecode.
Fixes #22840
(cherry picked from commit 382bd7dad9cd53254204f418190368667a127f64)
- - - - -
31a90769 by Matthew Pickering at 2023-02-09T12:05:56-05:00
driver: Use hooks from plugin_hsc_env
This fixes a bug in oneshot mode where hooks modified in a plugin
wouldn't be used in oneshot mode because we neglected to use the right
hsc_env. This was observed by @csabahruska.
(cherry picked from commit cc72e71298ce7e8ef7a2263a531f96d777db1800)
- - - - -
11686fb4 by Aaron Allen at 2023-02-09T12:06:01-05:00
Rework plugin initialisation points
In general this patch pushes plugin initialisation points to earlier in
the pipeline. As plugins can modify the `HscEnv`, it's imperative that
the plugins are initialised as soon as possible and used thereafter.
For example, there are some new tests which modify hsc_logger and other
hooks which failed to fire before (and now do)
One consequence of this change is that the error for specifying the
usage of a HPT plugin from the command line has changed, because it's
now attempted to be loaded at initialisation rather than causing a
cyclic module import.
Closes #21279
Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com>
(cherry picked from commit c31e87bbb13c0139b75acd234fd48eeb40cf50af)
- - - - -
94844882 by Ben Gamari at 2023-02-09T12:06:40-05:00
nativeGen/AArch64: Emit Atomic{Read,Write} inline
Previously the AtomicRead and AtomicWrite operations were emitted as
out-of-line calls. However, these tend to be very important for
performance, especially the RELAXED case (which only exists for
ThreadSanitizer checking).
Fixes #22115.
(cherry picked from commit 6e52fcb915baa1acb38ad2b1f313e8e6a89899f5)
- - - - -
30 changed files:
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Driver/Config/Stg/Pipeline.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Types.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Tc/Gen/Pat.hs
- ghc/Main.hs
- + testsuite/tests/gadt/T19847.hs
- + testsuite/tests/gadt/T19847a.hs
- + testsuite/tests/gadt/T19847a.stderr
- testsuite/tests/gadt/all.T
- testsuite/tests/ghci/should_run/all.T
- testsuite/tests/plugins/all.T
- + testsuite/tests/plugins/hooks-plugin/Hooks/LogPlugin.hs
- testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs → testsuite/tests/plugins/hooks-plugin/Hooks/MetaPlugin.hs
- + testsuite/tests/plugins/hooks-plugin/Hooks/PhasePlugin.hs
- testsuite/tests/plugins/hooks-plugin/hooks-plugin.cabal
- testsuite/tests/plugins/plugins04.stderr
- testsuite/tests/plugins/test-hooks-plugin.hs
- + testsuite/tests/plugins/test-log-hooks-plugin.hs
- + testsuite/tests/plugins/test-log-hooks-plugin.stderr
- + testsuite/tests/plugins/test-phase-hooks-plugin.hs
- + testsuite/tests/plugins/test-phase-hooks-plugin.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5809d9d7ba1845abdaede9bd8ad978026940359f...948448826d6913cdc133c33f054ef53485a47598
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5809d9d7ba1845abdaede9bd8ad978026940359f...948448826d6913cdc133c33f054ef53485a47598
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/20230209/9d8dbf60/attachment.html>
More information about the ghc-commits
mailing list