[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 23:23:26 UTC 2023



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


Commits:
26eb6c21 by Sylvain Henry at 2023-07-31T19:23:09-04:00
JS: implement getMonotonicTime (fix #23687)

- - - - -
20fca42d by Bartłomiej Cieślar at 2023-07-31T19:23:12-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>

- - - - -
edd428fc by Matthew Pickering at 2023-07-31T19:23:13-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

- - - - -
0d3ec9bf by Ben Gamari at 2023-07-31T19:23:14-04:00
compiler: Style fixes

- - - - -
e07ebd26 by Ben Gamari at 2023-07-31T19:23:14-04:00
rts: Fix implicit cast

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

- - - - -
0f186181 by Ben Gamari at 2023-07-31T19:23:14-04:00
testsuite: Fix warning in hs_try_putmvar001

- - - - -
b0e7aa27 by Ben Gamari at 2023-07-31T19:23:14-04:00
testsuite: Add AtomicModifyIORef test

- - - - -
2b99bbd3 by Ben Gamari at 2023-07-31T19:23:14-04:00
rts: Introduce NO_WARN macro

This allows fine-grained ignoring of warnings.

- - - - -
942a5b6b by Ben Gamari at 2023-07-31T19:23:14-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.

- - - - -
3f11fff0 by Ben Gamari at 2023-07-31T19:23:14-04:00
rts: Introduce more principled fence operations

- - - - -
aead566d by Ben Gamari at 2023-07-31T19:23:14-04:00
rts: Introduce SET_INFO_RELAXED

- - - - -
abfbac1b by Ben Gamari at 2023-07-31T19:23:14-04:00
rts: Style fixes

- - - - -
95bc1222 by Ben Gamari at 2023-07-31T19:23:14-04:00
codeGen/tsan: Rework handling of spilling

- - - - -
3547febc by Ben Gamari at 2023-07-31T19:23:14-04:00
hadrian: More debug information

- - - - -
07ff8bba by Ben Gamari at 2023-07-31T19:23:14-04:00
Improve TSAN documentation

- - - - -
3d633a32 by Ben Gamari at 2023-07-31T19:23:14-04:00
hadrian: More selective TSAN instrumentation

- - - - -
6204a771 by Alan Zimmerman at 2023-07-31T19:23:15-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

- - - - -
116de499 by Bartłomiej Cieślar at 2023-07-31T19:23:19-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

- - - - -
76985e7c by Andreas Klebinger at 2023-07-31T19:23:20-04:00
AArch NCG: Pure refactor

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

- - - - -
52036ca4 by Andreas Klebinger at 2023-07-31T19:23:20-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/929bb674489e31e1f28d09d801c8ff79ad58c0fe...52036ca4bbdf1e883f6a009b06daa8233d1e4529

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/929bb674489e31e1f28d09d801c8ff79ad58c0fe...52036ca4bbdf1e883f6a009b06daa8233d1e4529
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/96f21d10/attachment-0001.html>


More information about the ghc-commits mailing list