[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 20 commits: JS: implement getMonotonicTime (fix #23687)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Jul 31 20:53:30 UTC 2023



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


Commits:
909a2cf3 by Sylvain Henry at 2023-07-31T16:52:01-04:00
JS: implement getMonotonicTime (fix #23687)

- - - - -
fd514d64 by Bartłomiej Cieślar at 2023-07-31T16:52:04-04:00
Implementation of the Deprecated Instances proposal #575

This commit implements the ability to deprecate certain instances,
which causes the compiler to emit the desired deprecation message
whenever they are instantiated. For example:

  module A where
  class C t where
  instance {-# DEPRECATED "dont use" #-} C Int where

  module B where
  import A
  f :: C t => t
  f = undefined
  g :: Int
  g = f -- "dont use" emitted here

The implementation is as follows:
  - In the parser, we parse deprecations/warnings attached to instances:

      instance {-# DEPRECATED "msg" #-} Show X
      deriving instance {-# WARNING "msg2" #-} Eq Y

    (Note that non-standalone deriving instance declarations do not support
    this mechanism.)

  - We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`).
    In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`),
    we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too).

  - Finally, when we solve a constraint using such an instance, in
    `GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning
    that was stored in `ClsInst`.
    Note that we only emit a warning when the instance is used in a different module
    than it is defined, which keeps the behaviour in line with the deprecation of
    top-level identifiers.

Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>

- - - - -
4f4af4b5 by Matthew Pickering at 2023-07-31T16:52:04-04:00
ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job

Warnings when building Hadrian can end up cluttering the output of HLS,
and we've had bug reports in the past about these warnings when building
Hadrian. It would be nice to turn on -Werror on at least one build of
Hadrian in CI to avoid a patch introducing warnings when building
Hadrian.

Fixes #23638

- - - - -
abe68d62 by Ben Gamari at 2023-07-31T16:52:05-04:00
compiler: Style fixes

- - - - -
6eb61e8c by Ben Gamari at 2023-07-31T16:52:05-04:00
rts: Fix implicit cast

This ensures that Task.h can be built with a C++ compiler.

- - - - -
5141a516 by Ben Gamari at 2023-07-31T16:52:05-04:00
testsuite: Fix warning in hs_try_putmvar001

- - - - -
9d4f9af7 by Ben Gamari at 2023-07-31T16:52:05-04:00
testsuite: Add AtomicModifyIORef test

- - - - -
a1e53ab0 by Ben Gamari at 2023-07-31T16:52:05-04:00
rts: Introduce NO_WARN macro

This allows fine-grained ignoring of warnings.

- - - - -
0eac0768 by Ben Gamari at 2023-07-31T16:52:05-04:00
rts: Simplify atomicModifyMutVar2# implementation

Previously we would perform a redundant load in the non-threaded RTS in
atomicModifyMutVar2# implementation for the benefit of the non-moving
GC's write barrier. Eliminate this.

- - - - -
4ca661f7 by Ben Gamari at 2023-07-31T16:52:05-04:00
rts: Introduce more principled fence operations

- - - - -
c2bbdd24 by Ben Gamari at 2023-07-31T16:52:06-04:00
rts: Introduce SET_INFO_RELAXED

- - - - -
0a8c809f by Ben Gamari at 2023-07-31T16:52:06-04:00
rts: Style fixes

- - - - -
b71528af by Ben Gamari at 2023-07-31T16:52:06-04:00
codeGen/tsan: Rework handling of spilling

- - - - -
3eab8981 by Ben Gamari at 2023-07-31T16:52:06-04:00
hadrian: More debug information

- - - - -
28145b04 by Ben Gamari at 2023-07-31T16:52:06-04:00
Improve TSAN documentation

- - - - -
eb970b0e by Ben Gamari at 2023-07-31T16:52:06-04:00
hadrian: More selective TSAN instrumentation

- - - - -
0bb97c64 by Alan Zimmerman at 2023-07-31T16:52:07-04:00
EPA: Provide correct annotation span for ImportDecl

Use the whole declaration, rather than just the span of the 'import'
keyword.

Metric Decrease:
   T9961
   T5205
Metric Increase:
  T13035

- - - - -
2c1dddef by Bartłomiej Cieślar at 2023-07-31T16:52:11-04:00
Add cases to T23279: HasField for deprecated record fields

This commit adds additional tests from ticket #23279 to ensure that we don't
regress on reporting deprecated record fields in conjunction with HasField,
either when using overloaded record dot syntax or directly through `getField`.

Fixes #23279

- - - - -
e799483d by Andreas Klebinger at 2023-07-31T16:52:11-04:00
AArch NCG: Pure refactor

Combine some alternatives. Add some line breaks for overly long lines

- - - - -
929bb674 by Andreas Klebinger at 2023-07-31T16:52:12-04:00
Aarch ncg: Optimize immediate use for address calculations

When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.

This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.

-------------------------
Metric Decrease:
    T4801
    T5321FD
    T5321Fun
-------------------------

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Unit/Module/Warnings.hs
- docs/users_guide/exts/pragmas.rst
- hadrian/ghci-cabal.in


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3f5762cd907191ee8d8c884e4efb2609272ceb4...929bb674489e31e1f28d09d801c8ff79ad58c0fe

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3f5762cd907191ee8d8c884e4efb2609272ceb4...929bb674489e31e1f28d09d801c8ff79ad58c0fe
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/20230731/261d410b/attachment-0001.html>


More information about the ghc-commits mailing list