[Git][ghc/ghc][wip/angerman/sized] 28 commits: testsuite: Add --top flag to driver

Moritz Angermann gitlab at gitlab.haskell.org
Tue Nov 3 08:40:23 UTC 2020



Moritz Angermann pushed to branch wip/angerman/sized at Glasgow Haskell Compiler / GHC


Commits:
4ce2f7d6 by GHC GitLab CI at 2020-11-02T23:45:06-05:00
testsuite: Add --top flag to driver

This allows us to make `config.top` a proper Path. Previously it was a
str, which caused the Ghostscript detection logic to break.

- - - - -
0b772221 by Ben Gamari at 2020-11-02T23:45:42-05:00
Document that ccall convention doesn't support varargs

We do not support foreign "C" imports of varargs functions. While this
works on amd64, in general the platform's calling convention may need
more type information that our Cmm representation can currently provide.
For instance, this is the case with Darwin's AArch64 calling convention.
Document this fact in the users guide and fix T5423 which makes use of a
disallowed foreign import.

Closes #18854.

- - - - -
81006a06 by David Eichmann at 2020-11-02T23:46:19-05:00
RtsAPI: pause and resume the RTS

The `rts_pause` and `rts_resume` functions have been added to `RtsAPI.h` and
allow an external process to completely pause and resume the RTS.

Co-authored-by: Sven Tennie <sven.tennie at gmail.com>
Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com>
Co-authored-by: Ben Gamari <bgamari.foss at gmail.com>

- - - - -
bfb1e272 by Ryan Scott at 2020-11-02T23:46:55-05:00
Display results of GHC.Core.Lint.lint* functions consistently

Previously, the functions in `GHC.Core.Lint` used a patchwork of
different ways to display Core Lint errors:

* `lintPassResult` (which is the source of most Core Lint errors) renders
  Core Lint errors with a distinctive banner (e.g.,
  `*** Core Lint errors : in result of ... ***`) that sets them apart
  from ordinary GHC error messages.
* `lintAxioms`, in contrast, uses a completely different code path that
  displays Core Lint errors in a rather confusing manner. For example,
  the program in #18770 would give these results:

  ```
  Bug.hs:1:1: error:
      Bug.hs:12:1: warning:
          Non-*-like kind when *-like expected: RuntimeRep
          when checking the body of forall: 'TupleRep '[r]
          In the coercion axiom Bug.N:T :: []. Bug.T ~_R Any
          Substitution: [TCvSubst
                           In scope: InScope {r}
                           Type env: [axl :-> r]
                           Co env: []]
    |
  1 | {-# LANGUAGE DataKinds #-}
    | ^
  ```
* Further digging reveals that `GHC.IfaceToCore` displays Core Lint
  errors for iface unfoldings as though they were a GHC panic. See, for
  example, this excerpt from #17723:

  ```
  ghc: panic! (the 'impossible' happened)
    (GHC version 8.8.2 for x86_64-unknown-linux):
          Iface Lint failure
    In interface for Lib
    ...
  ```

This patch makes all of these code paths display Core Lint errors and
warnings consistently. I decided to adopt the conventions that
`lintPassResult` currently uses, as they appear to have been around the
longest (and look the best, in my subjective opinion). We now use the
`displayLintResult` function for all three scenarios mentioned above.
For example, here is what the Core Lint error for the program in #18770 looks
like after this patch:

```
[1 of 1] Compiling Bug              ( Bug.hs, Bug.o )
*** Core Lint errors : in result of TcGblEnv axioms ***
Bug.hs:12:1: warning:
    Non-*-like kind when *-like expected: RuntimeRep
    when checking the body of forall: 'TupleRep '[r_axn]
    In the coercion axiom N:T :: []. T ~_R Any
    Substitution: [TCvSubst
                     In scope: InScope {r_axn}
                     Type env: [axn :-> r_axn]
                     Co env: []]
*** Offending Program ***
axiom N:T :: T = Any -- Defined at Bug.hs:12:1
*** End of Offense ***

<no location info>: error:
Compilation had errors
```

Fixes #18770.

- - - - -
a9e5f52c by Simon Peyton Jones at 2020-11-02T23:47:31-05:00
Expand type synonyms with :kind!

The User's Guide claims that `:kind!` should expand type synonyms,
but GHCi wasn't doing this in practice. Let's just update the implementation
to match the specification in the User's Guide.

Fixes #13795. Fixes #18828.

Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com>

- - - - -
1370eda7 by Ben Gamari at 2020-11-02T23:48:06-05:00
hadrian: Don't capture RunTest output

There are a few reasons why capturing the output of the RunTest builder
is undesirable:

 * there is a large amount of output which then gets unnecessarily
   duplicated by Hadrian if the builder fails

 * the output may contain codepoints which are unrepresentable in the
   current codepage on Windows, causing Hadrian to crash

 * capturing the output causes the testsuite driver to disable
   its colorisation logic, making the output less legible.

- - - - -
2adffe1b by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Ints] I8/I16/I32 with unpacked ints now.

(cherry picked from commit acb5ce792806bc3c1e1730c6bdae853d2755de16)

- - - - -
1b368955 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Int] unpacked ints, part 2

(cherry picked from commit 872b3b35e269eaea771d0f98a9bce6ce9ff8f084)

- - - - -
3c4fffc1 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Int] unpacked ints, part 3

(cherry picked from commit 39b8861cf728ffeeb1d1f4abff073b8e4956d853)

- - - - -
02c3b439 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Int] T8832 fix test stdout.

(cherry picked from commit a6e59c84ace4a4f3cb1aa95ffaec3bb5b675d66a)

- - - - -
6a3be476 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Int] fix haddock

(cherry picked from commit 5764bca329c18619598fbe99433f581a119a5898)

- - - - -
f47e4c1f by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Int] move Int32# section.

(cherry picked from commit beba345453f368b7f76bf55161fe10f26b9b2110)

- - - - -
af751f6c by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Word] W8/W16/W32

(cherry picked from commit 8aef9557ae8a2a446090af4124d22d1d27a4a10d)

- - - - -
1fecf13f by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSize Word] pt 2

(cherry picked from commit 88764dd4d4cf744a02bde4c91c0ee1e510b88298)

- - - - -
59c6f380 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSize Word] pt 3

(cherry picked from commit dade52f58bc677040146362d8e49d7a42b82ae83)

- - - - -
0a76fb47 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Word] Constant Fold

(cherry picked from commit fe9a02930e2596660fd1bdb7c9dbd63d43085e05)

- - - - -
70ef6c92 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Word] Fix testsuite

(cherry picked from commit a0903f8eb626fa3444bcc880ac515d1fb6e52140)

- - - - -
e51b9f83 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized Word] More constant folds

(cherry picked from commit 13a7028bd83f33b0647cd924830f3ad228e9ee24)

- - - - -
78d575e0 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[SizedCmm Word] Trying to fix TH Quotes

(cherry picked from commit e98e3d124a92cdf48108d918e501a132eaaee53a)

- - - - -
7590b715 by Moritz Angermann at 2020-11-03T08:23:05+00:00
Fix superfluous import

- - - - -
0f9e1936 by Moritz Angermann at 2020-11-03T08:23:05+00:00
[CmmSized] bump submodules

- - - - -
ed4b2e64 by Moritz Angermann at 2020-11-03T08:23:05+00:00
Fix T8832

- - - - -
58262896 by Ben Gamari at 2020-11-03T08:23:05+00:00
CodeToByteCode: Fix handling of narrow datacon fields

Handle the non-word-size cases specifically and emit the appropriate
bytecode instructions.

- - - - -
cbadeb8d by Ben Gamari at 2020-11-03T08:23:05+00:00
Constant folding for extend/narrow

- - - - -
235464b1 by Ben Gamari at 2020-11-03T08:23:05+00:00
StgToCmm: Normalize padding

- - - - -
0d45991b by Moritz Angermann at 2020-11-03T08:23:05+00:00
Bump submodules

- - - - -
3332dc26 by Moritz Angermann at 2020-11-03T08:23:05+00:00
Make Libdw.c -Werror safe

- - - - -
dfecf8f7 by Moritz Angermann at 2020-11-03T08:38:42+00:00
bump text

- - - - -


30 changed files:

- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/CoreToByteCode.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- + compiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/StgToCmm/DataCon.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToCmm/Utils.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Types/Literal.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.2.1-notes.rst
- docs/users_guide/exts/ffi.rst
- ghc/ghc-bin.cabal.in
- hadrian/src/Builder.hs
- hadrian/src/Settings/Builders/RunTest.hs
- includes/RtsAPI.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87db2edf15b51c0ca3454e6dd93b40bb70edf14e...dfecf8f7553b02736bee8ad638e07d0be5dc9d01

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87db2edf15b51c0ca3454e6dd93b40bb70edf14e...dfecf8f7553b02736bee8ad638e07d0be5dc9d01
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/20201103/22d2a590/attachment-0001.html>


More information about the ghc-commits mailing list