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

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Aug 1 04:25:31 UTC 2023



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


Commits:
ded31924 by Sylvain Henry at 2023-08-01T00:25:09-04:00
JS: implement getMonotonicTime (fix #23687)

- - - - -
fba86a8f by Bartłomiej Cieślar at 2023-08-01T00:25: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>

- - - - -
44919b62 by Ben Gamari at 2023-08-01T00:25:12-04:00
compiler: Style fixes

- - - - -
ce6043b4 by Ben Gamari at 2023-08-01T00:25:12-04:00
rts: Fix implicit cast

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

- - - - -
0035a9f1 by Ben Gamari at 2023-08-01T00:25:13-04:00
testsuite: Fix warning in hs_try_putmvar001

- - - - -
a9bea84f by Ben Gamari at 2023-08-01T00:25:13-04:00
testsuite: Add AtomicModifyIORef test

- - - - -
07b6e601 by Ben Gamari at 2023-08-01T00:25:13-04:00
rts: Introduce NO_WARN macro

This allows fine-grained ignoring of warnings.

- - - - -
a5205977 by Ben Gamari at 2023-08-01T00:25:13-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.

- - - - -
cba24926 by Ben Gamari at 2023-08-01T00:25:13-04:00
rts: Introduce more principled fence operations

- - - - -
1dd7d77a by Ben Gamari at 2023-08-01T00:25:13-04:00
rts: Introduce SET_INFO_RELAXED

- - - - -
0e8c09f0 by Ben Gamari at 2023-08-01T00:25:13-04:00
rts: Style fixes

- - - - -
58f8b402 by Ben Gamari at 2023-08-01T00:25:13-04:00
codeGen/tsan: Rework handling of spilling

- - - - -
f6c322c3 by Ben Gamari at 2023-08-01T00:25:13-04:00
hadrian: More debug information

- - - - -
a6e01695 by Ben Gamari at 2023-08-01T00:25:13-04:00
Improve TSAN documentation

- - - - -
bc3d80bb by Ben Gamari at 2023-08-01T00:25:13-04:00
hadrian: More selective TSAN instrumentation

- - - - -
c4dc300d by Alan Zimmerman at 2023-08-01T00:25:14-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

- - - - -
94497400 by Bartłomiej Cieślar at 2023-08-01T00:25:18-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

- - - - -
71ec84ad by Andreas Klebinger at 2023-08-01T00:25:19-04:00
AArch NCG: Pure refactor

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

- - - - -
89abe72e by Andreas Klebinger at 2023-08-01T00:25:19-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:

- 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/src/Flavour.hs
- libraries/base/GHC/Clock.hsc


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/17fca32bd5b89a1bdb1f3d3a7eda8f17a9744023...89abe72eaefa11aa6175e565b602b7e87b8b01ee

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/17fca32bd5b89a1bdb1f3d3a7eda8f17a9744023...89abe72eaefa11aa6175e565b602b7e87b8b01ee
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/20230801/6e6a6d1a/attachment-0001.html>


More information about the ghc-commits mailing list