[Git][ghc/ghc][wip/torsten.schmits/finder-boot] 38 commits: compiler: Fix pretty printing of ticked prefix constructors (#24237)

Sjoerd Visscher (@trac-sjoerd_visscher) gitlab at gitlab.haskell.org
Fri Sep 6 11:50:21 UTC 2024



Sjoerd Visscher pushed to branch wip/torsten.schmits/finder-boot at Glasgow Haskell Compiler / GHC


Commits:
5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00
compiler: Fix pretty printing of ticked prefix constructors (#24237)

- - - - -
ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00
Fix #15773 Clarify further -rtsopts 'defaults' in docs

- - - - -
05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00
Improve efficiency of `assertError` (#24625)

... by moving `lazy` to the exception-throwing branch.
It's all documented in `Note [Strictness of assertError]`.

- - - - -
c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00
GHCi debugger: drop record name spaces for Ids

When binding new local variables at a breakpoint, we should create
Ids with variable namespace, and not record field namespace. Otherwise
the rest of the compiler falls over because the IdDetails are wrong.

Fixes #25109

- - - - -
bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00
base: Final deprecation of GHC.Pack

The timeline mandated by #21461 has come to its term and after two years
and four minor releases, we are finally removing GHC.Pack from base.

Closes #21536

- - - - -
5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00
JS: support rubbish static literals (#25177)

Support for rubbish dynamic literals was added in #24664. This patch
does the same for static literals.

Fix #25177

- - - - -
b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00
haddock docs: prefix comes before, postfix comes after

- - - - -
6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00
haddock: include package info with --show-interface

- - - - -
7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00
Document the (x86) SIMD macros.

Fixes #25021.

- - - - -
05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00
ghc-internal: Derive version from ghc's version

Fixes #25005

- - - - -
73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00
base: Deprecate GHC.Desugar

See https://github.com/haskell/core-libraries-committee/issues/216.

This will be removed in GHC 9.14.

- - - - -
821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00
compiler: Store ForeignStubs and foreign C files in interfaces

This data is used alongside Core bindings to reconstruct intermediate
build products when linking Template Haskell splices with bytecode.

Since foreign stubs and files are generated in the pipeline, they were
lost with only Core bindings stored in interfaces.

The interface codec type `IfaceForeign` contains a simplified
representation of `ForeignStubs` and the set of foreign sources that
were manually added by the user.

When the backend phase writes an interface, `mkFullIface` calls
`encodeIfaceForeign` to read foreign source file contents and assemble
`IfaceForeign`.

After the recompilation status check of an upstream module,
`initWholeCoreBindings` calls `decodeIfaceForeign` to restore
`ForeignStubs` and write the contents of foreign sources to the file
system as temporary files.
The restored foreign inputs are then processed by `hscInteractive` in
the same manner as in a regular pipeline.

When linking the stub objects for splices, they are excluded from suffix
adjustment for the interpreter way through a new flag in `Unlinked`.

For details about these processes, please consult Note [Foreign stubs
and TH bytecode linking].

Metric Decrease:
    T13701

- - - - -
f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00
git: remove a.out and include it in .gitignore

a.out is a configure script byproduct. It was mistakenly checked into
the tree in !13118. This patch removes it, and include it in
.gitignore to prevent a similar error in the future.

- - - - -
1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00
docs: Fix code-block syntax on old sphinx version

This code-block directive breaks the deb9 sphinx build.

Fixes #25201

- - - - -
27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00
JS: add basic support for POSIX *at functions (#25190)

openat/fstatat/unlinkat/dup are now used in the recent release of the
`directory` and `file-io` packages.

As such, these functions are (indirectly) used in the following tests
one we'll bump the `directory` submodule (see !13122):
- openFile008
- jsOptimizer
- T20509
- bkpcabal02
- bkpcabal03
- bkpcabal04

- - - - -
c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00
Update directory submodule to latest master

The primary reason for this bump is to fix the warning from `ghc-pkg
check`:

```
Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory
```

This also requires adding the `file-io` package as a boot library (which
is discussed in #25145)

Fixes #23594 #25145

- - - - -
4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00
Fix aarch64-alpine target platform description

We are producing bindists where the target triple is

aarch64-alpine-linux

when it should be

aarch64-unknown-linux

This is because the bootstrapped compiler originally set the target
triple to `aarch64-alpine-linux` which is when propagated forwards by
setting `bootstrap_target` from the bootstrap compiler target.

In order to break this chain we explicitly specify build/host/target for
aarch64-alpine.

This requires a new configure flag `--enable-ignore-` which just
switches off a validation check that the target platform of the
bootstrap compiler is the same as the build platform. It is the same,
but the name is just wrong.

These commits can be removed when the bootstrap compiler has the correct
target triple (I looked into patching this on ci-images, but it looked
hard to do correctly as the build/host platform is not in the settings
file).

Fixes #25200

- - - - -
e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00
Bump nixpkgs commit for gen_ci script

- - - - -
63a27091 by doyougnu at 2024-08-26T20:39:30-04:00
rts: win32: emit additional debugging information

-- migration from haskell.nix

- - - - -
aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00
Only export defaults when NamedDefaults are enabled (#25206)

This is a reinterpretation of GHC Proposal #409 that avoids a breaking
change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal"

Consider a module M that has no explicit export list:

	module M where
	default (Rational)

Should it export the default (Rational)?

The proposal says "yes", and there's a test case for that:

	default/DefaultImport04.hs

However, as it turns out, this change in behavior breaks existing
programs, e.g. the colour-2.3.6 package can no longer be compiled,
as reported in #25206.

In this patch, we make implicit exports of defaults conditional on
the NamedDefaults extension. This fix is unintrusive and compliant
with the existing proposal text (i.e. it does not require a proposal
amendment). Should the proposal be amended, we can go for a simpler
solution, such as requiring all defaults to be exported explicitly.

Test case: testsuite/tests/default/T25206.hs

- - - - -
3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00
simplifier: Fix space leak during demand analysis

The lazy structure (a list) in a strict field in `DmdType` is not fully
forced which leads to a very large thunk build-up.

It seems there is likely still more work to be done here as it seems we
may be trading space usage for work done. For now, this is the right
choice as rather than using all the memory on my computer, compilation
just takes a little bit longer.

See #25196

- - - - -
c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00
Add missing parenthesizeHsType in cvtp's InvisP case

We need to ensure that when we convert an `InvisP` (invisible type pattern) to
a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as
`@(a :: k)` will parse correctly when roundtripped back through the parser.

Fixes #25209.

- - - - -
1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00
Haddock: Add no-compilation flag

This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them.

- - - - -
768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00
Add functions to check for weakly pinned arrays.

This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops.
These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved
by the user via compaction but won't be moved by the RTS.

This moves us one more stop closer to nailing down #22255.

- - - - -
b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00
ghc-toolchain: Don't leave stranded a.outs when testing for -g0

This happened because, when ghc-toolchain tests for -g0, it does so by
compiling an empty program.  This compilation creates an a.out.

Since we create a temporary directory, lets place the test program
compilation in it also, so that it gets cleaned up.

Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74
Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203

- - - - -
83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00
Build foreign objects for TH with interpreter's way when loading from iface

Fixes #25211

When linking bytecode for TH from interface core bindings with
`-fprefer-byte-code`, foreign sources are loaded from the interface as
well and compiled to object code in an ad-hoc manner.

The results are then loaded by the interpreter, whose way may differ
from the current build's target way.

This patch ensures that foreign objects are compiled with the
interpreter's way.

- - - - -
0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00
rts: fix checkClosure error message

This patch fixes an error message in checkClosure() when the closure
has already been evacuated. The previous logic was meant to print the
evacuated closure's type in the error message, but it was completely
wrong, given info was not really an info table, but a tagged pointer
that points to the closure's new address.

- - - - -
fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00
MO_AcquireFence: Less restrictive barrier

GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)`
to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which
also implies stores.)

- - - - -
a45f1488 by Fendor at 2024-09-04T20:22:00-04:00
testsuite: Add support to capture performance metrics via 'perf'

Performance metrics collected via 'perf' can be more accurate for
run-time performance than GHC's rts, due to the usage of hardware
counters.

We allow performance tests to also record PMU events according to 'perf
list'.

- - - - -
ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00
gitlab-ci: Add nightly job for running the testsuite with perf profiling support

- - - - -
6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00
Enable perf profiling for compiler performance tests

- - - - -
da306610 by sheaf at 2024-09-04T20:22:41-04:00
RecordCon lookup: don't allow a TyCon

This commit adds extra logic when looking up a record constructor.
If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to
the logic explained in Note [Pattern to type (P2T) conversion]),
we emit an error saying that the data constructor is not in scope.

This avoids the compiler falling over shortly thereafter, in the call to
'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc',
because the record constructor would not have been a ConLike.

Fixes #25056

- - - - -
9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00
Use deterministic names for temporary files

When there are multiple threads they can race to create a temporary
file, in some situations the thread will create ghc_1.c and in some it
will create ghc_2.c. This filename ends up in the debug info for object
files after compiling a C file, therefore contributes to object
nondeterminism.

In order to fix this we store a prefix in `TmpFs` which serves to
namespace temporary files. The prefix is populated from the counter in
TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked
outside the thread which consumes it, in a deterministic order, so each
thread always receives a TmpFs with the same prefix.

This assumes that after the initial TmpFs is created, all other TmpFs
are created from forking the original TmpFs. Which should have been try
anyway as otherwise there would be file collisions and non-determinism.

Fixes #25224

- - - - -
59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00
Silence x-partial in Haddock.Backends.Xhtml

This is an unfortunate consequence of two mechanisms:
  * GHC provides (possibly-empty) lists of names
  * The functions that retrieve those names are not equipped to do error
    reporting, and thus accept these lists at face value. They will have
    to be attached an effect for error reporting in a later refactoring

- - - - -
8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00
hadrian: Support loading haddock in ghci

There is one tricky aspect with wired-in packages where the boot package
is built with `-this-unit-id ghc` but the dependency is reported as
`-package-id ghc-9.6...`. This has never been fixed in GHC as the
situation of loading wired-in packages into the multi-repl seems like
quite a niche feature that is always just easier to workaround.

- - - - -
6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00
hadrian/multi: Load all targets when ./hadrian/ghci-multi is called

This seems to make a bit more sense than just loading `ghc` component
(and dependencies).

- - - - -
7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00
ci: Beef up determinism interface test

There have recently been some determinism issues with the simplifier and
documentation. We enable more things to test in the ABI test to check
that we produce interface files deterministically.

- - - - -
5545f976 by Torsten Schmits at 2024-09-06T13:49:59+02:00
add `IsBootInterface` to finder cache keys

- - - - -


30 changed files:

- .gitignore
- .gitlab/ci.sh
- .gitlab/generate-ci/flake.lock
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitmodules
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Literal.hs
- compiler/GHC/StgToJS/Prim.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4254f658dc7f2359917edc2fff35fda5a4f08d0...5545f976a0934e1b0ab7543b7879aaf9ba5c9fc3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4254f658dc7f2359917edc2fff35fda5a4f08d0...5545f976a0934e1b0ab7543b7879aaf9ba5c9fc3
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/20240906/417c346a/attachment-0001.html>


More information about the ghc-commits mailing list