[Git][ghc/ghc][wip/T22264] 77 commits: Don't allow . in overloaded labels
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Feb 15 18:05:12 UTC 2023
Ben Gamari pushed to branch wip/T22264 at Glasgow Haskell Compiler / GHC
Commits:
b17fb3d9 by sheaf at 2023-02-07T10:51:33-05:00
Don't allow . in overloaded labels
This patch removes . from the list of allowed characters in a non-quoted
overloaded label, as it was realised this steals syntax, e.g. (#.).
Users who want this functionality will have to add quotes around the
label, e.g. `#"17.28"`.
Fixes #22821
- - - - -
5dce04ee by romes at 2023-02-07T10:52:10-05:00
Update kinds in comments in GHC.Core.TyCon
Use `Type` instead of star kind (*)
Fix comment with incorrect kind * to have kind `Constraint`
- - - - -
92916194 by Ben Gamari at 2023-02-07T10:52:48-05:00
Revert "Use fix-sized equality primops for fixed size boxed types"
This reverts commit 024020c38126f3ce326ff56906d53525bc71690c.
This was never applied to master/9.6 originally.
See #20405 for why using these primops is a bad idea.
(cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865)
- - - - -
c1670c6b by Sylvain Henry at 2023-02-07T21:25:18-05:00
JS: avoid head/tail and unpackFS
- - - - -
a9912de7 by Krzysztof Gogolewski at 2023-02-07T21:25:53-05:00
testsuite: Fix Python warnings (#22856)
- - - - -
9ee761bf by sheaf at 2023-02-08T14:40:40-05:00
Fix tyvar scoping within class SPECIALISE pragmas
Type variables from class/instance headers scope over class/instance
method type signatures, but DO NOT scope over the type signatures in
SPECIALISE and SPECIALISE instance pragmas.
The logic in GHC.Rename.Bind.rnMethodBinds correctly accounted for
SPECIALISE inline pragmas, but forgot to apply the same treatment
to method SPECIALISE pragmas, which lead to a Core Lint failure with
an out-of-scope type variable. This patch makes sure we apply the same
logic for both cases.
Fixes #22913
- - - - -
7eac2468 by Matthew Pickering at 2023-02-08T14:41:17-05:00
Revert "Don't keep exit join points so much"
This reverts commit caced75765472a1a94453f2e5a439dba0d04a265.
It seems the patch "Don't keep exit join points so much" is causing
wide-spread regressions in the bytestring library benchmarks. If I
revert it then the 9.6 numbers are better on average than 9.4.
See https://gitlab.haskell.org/ghc/ghc/-/issues/22893#note_479525
-------------------------
Metric Decrease:
MultiComponentModules
MultiComponentModulesRecomp
MultiLayerModules
MultiLayerModulesRecomp
MultiLayerModulesTH_Make
T12150
T13386
T13719
T21839c
T3294
parsing001
-------------------------
- - - - -
633f2799 by Cheng Shao at 2023-02-08T18:42:16-05:00
testsuite: remove config.use_threads
This patch simplifies the testsuite driver by removing the use_threads
config field. It's just a degenerate case of threads=1.
- - - - -
ca6673e3 by Cheng Shao at 2023-02-08T18:42:16-05:00
testsuite: use concurrent.futures.ThreadPoolExecutor in the driver
The testsuite driver used to create one thread per test case, and
explicitly use semaphore and locks for rate limiting and
synchronization. This is a bad practice in any language, and
occasionally may result in livelock conditions (e.g. #22889). This
patch uses concurrent.futures.ThreadPoolExecutor for scheduling test
case runs, which is simpler and more robust.
- - - - -
f22cce70 by Alan Zimmerman at 2023-02-08T18:42:51-05:00
EPA: Comment between module and where should be in header comments
Do not apply the heuristic to associate a comment with a prior
declaration for the first declaration in the file.
Closes #22919
- - - - -
d69ecac2 by Josh Meredith at 2023-02-09T03:24:05-05:00
JS generated refs: update testsuite conditions
- - - - -
2ea1a6bc by sheaf at 2023-02-09T03:24:44-05:00
Bump transformers to 0.6.1.0
This allows us to avoid orphans for Foldable1 instances,
fixing #22898.
Updates transformers submodule.
- - - - -
d9d0c28d by konsumlamm at 2023-02-09T14:07:48-05:00
Update `Data.List.singleton` doc comment
- - - - -
fe9cd6ef by Ben Gamari at 2023-02-09T14:08:23-05:00
gitlab-template: Emphasize `user facing` label
My sense is that the current mention of the ~"user facing" label is
overlooked by many MR authors.
Let's move this point up in the list to make it more likely that it is
seen. Also rephrase some of the points.
- - - - -
e45eb828 by Simon Peyton Jones at 2023-02-10T06:51:28-05:00
Refactor the simplifier a bit to fix #22761
The core change in this commit, which fixes #22761, is that
* In a Core rule, ru_rhs is always occ-analysed.
This means adding a couple of calls to occurAnalyseExpr when
building a Rule, in
* GHC.Core.Rules.mkRule
* GHC.Core.Opt.Simplify.Iteration.simplRules
But diagosing the bug made me stare carefully at the code of the
Simplifier, and I ended up doing some only-loosely-related refactoring.
* I think that RULES could be lost because not every code path
did addBndrRules
* The code around lambdas was very convoluted
It's mainly moving deck chairs around, but I like it more now.
- - - - -
11e0cacb by Rebecca Turner at 2023-02-10T06:52:09-05:00
Detect the `mold` linker
Enables support for the `mold` linker by rui314.
- - - - -
59556235 by parsonsmatt at 2023-02-10T09:53:11-05:00
Add Lift instance for Fixed
- - - - -
c44e5f30 by Sylvain Henry at 2023-02-10T09:53:51-05:00
Testsuite: decrease length001 timeout for JS (#22921)
- - - - -
133516af by Zubin Duggal at 2023-02-10T09:54:27-05:00
compiler: Use NamedFieldPuns for `ModIface_` and `ModIfaceBackend` `NFData`
instances
This is a minor refactor that makes it easy to add and remove fields from
`ModIface_` and `ModIfaceBackend`.
Also change the formatting to make it clear exactly which fields are
fully forced with `rnf`
- - - - -
1e9eac1c by Matthew Pickering at 2023-02-13T11:36:41+01:00
Refresh profiling docs
I went through the whole of the profiling docs and tried to amend them
to reflect current best practices and tooling. In particular I removed
some old references to tools such as hp2any and replaced them with
references to eventlog2html.
- - - - -
da208b9a by Matthew Pickering at 2023-02-13T11:36:41+01:00
docs: Add section about profiling and foreign calls
Previously there was no documentation for how foreign calls interacted
with the profiler. This can be quite confusing for users so getting it
into the user guide is the first step to a potentially better solution.
See the ticket for more insightful discussion.
Fixes #21764
- - - - -
081640f1 by Bodigrim at 2023-02-13T12:51:52-05:00
Document that -fproc-alignment was introduced only in GHC 8.6
- - - - -
16adc349 by Sven Tennie at 2023-02-14T11:26:31-05:00
Add clangd flag to include generated header files
This enables clangd to correctly check C files that import Rts.h.
(The added include directory contains ghcautoconf.h et. al.)
- - - - -
c399ccd9 by amesgen at 2023-02-14T11:27:14-05:00
Mention new `Foreign.Marshal.Pool` implementation in User's Guide
- - - - -
b9282cf7 by Ben Gamari at 2023-02-14T11:27:50-05:00
upload_ghc_libs: More control over which packages to operate on
Here we add a `--skip` flag to `upload_ghc_libs`, making it easier to
limit which packages to upload. This is often necessary when one package
is not uploadable (e.g. see #22740).
- - - - -
aa3a262d by PHO at 2023-02-14T11:28:29-05:00
Assume platforms support rpaths if they use either ELF or Mach-O
Not only Linux, Darwin, and FreeBSD support rpaths. Determine the usability
of rpaths based on the object format, not on OS.
- - - - -
47716024 by PHO at 2023-02-14T11:29:09-05:00
RTS linker: Improve compatibility with NetBSD
1. Hint address to NetBSD mmap(2) has a different semantics from that of
Linux. When a hint address is provided, mmap(2) searches for a free
region at or below the hint but *never* above it. This means we can't
reliably search for free regions incrementally on the userland,
especially when ASLR is enabled. Let the kernel do it for us if we don't
care where the mapped address is going to be.
2. NetBSD not only hates to map pages as rwx, but also disallows to switch
pages from rw- to r-x unless the intention is declared when pages are
initially requested. This means we need a new MemoryAccess mode for
pages that are going to be changed to r-x.
- - - - -
11de324a by Li-yao Xia at 2023-02-14T11:29:49-05:00
base: Move changelog entry to its place
- - - - -
75930424 by Ben Gamari at 2023-02-14T11:30:27-05:00
nativeGen/AArch64: Emit Atomic{Read,Write} inline
Previously the AtomicRead and AtomicWrite operations were emitted as
out-of-line calls. However, these tend to be very important for
performance, especially the RELAXED case (which only exists for
ThreadSanitizer checking).
Fixes #22115.
- - - - -
d6411d6c by Andreas Klebinger at 2023-02-14T11:31:04-05:00
Fix some correctness issues around tag inference when targeting the bytecode generator.
* Let binders are now always assumed untagged for bytecode.
* Imported referenced are now always assumed to be untagged for bytecode.
Fixes #22840
- - - - -
9fb4ca89 by sheaf at 2023-02-14T11:31:49-05:00
Introduce warning for loopy superclass solve
Commit aed1974e completely re-engineered the treatment of loopy
superclass dictionaries in instance declarations. Unfortunately,
it has the potential to break (albeit in a rather minor way) user code.
To alleviate migration concerns, this commit re-introduces the old
behaviour. Any reliance on this old behaviour triggers a warning,
controlled by `-Wloopy-superclass-solve`. The warning text explains
that GHC might produce bottoming evidence, and provides a migration
strategy.
This allows us to provide a graceful migration period, alerting users
when they are relying on this unsound behaviour.
Fixes #22912 #22891 #20666 #22894 #22905
- - - - -
1928c7f3 by Cheng Shao at 2023-02-14T11:32:26-05:00
rts: make it possible to change mblock size on 32-bit targets
The MBLOCK_SHIFT macro must be the single source of truth for defining
the mblock size, and changing it should only affect performance, not
correctness. This patch makes it truly possible to reconfigure mblock
size, at least on 32-bit targets, by fixing places which implicitly
relied on the previous MBLOCK_SHIFT constant. Fixes #22901.
- - - - -
78aa3b39 by Simon Hengel at 2023-02-14T11:33:06-05:00
Update outdated references to notes
- - - - -
e8baecd2 by meooow25 at 2023-02-14T11:33:49-05:00
Documentation: Improve Foldable1 documentation
* Explain foldrMap1, foldlMap1, foldlMap1', and foldrMap1' in greater
detail, the text is mostly adapted from documentation of Foldable.
* Describe foldr1, foldl1, foldl1' and foldr1' in terms of the above
functions instead of redoing the full explanation.
* Small updates to documentation of fold1, foldMap1 and toNonEmpty,
again adapting from Foldable.
* Update the foldMap1 example to lists instead of Sum since this is
recommended for lazy right-associative folds.
Fixes #22847
- - - - -
85a1a575 by romes at 2023-02-14T11:34:25-05:00
fix: Mark ghci Prelude import as implicit
Fixes #22829
In GHCi, we were creating an import declaration for Prelude but we were
not setting it as an implicit declaration. Therefore, ghci's import of
Prelude triggered -Wmissing-import-lists.
Adds regression test T22829 to testsuite
- - - - -
3b019a7a by Cheng Shao at 2023-02-14T11:35:03-05:00
compiler: fix generateCgIPEStub for no-tables-next-to-code builds
generateCgIPEStub already correctly implements the CmmTick finding
logic for when tables-next-to-code is on/off, but it used the wrong
predicate to decide when to switch between the two. Previously it
switches based on whether the codegen is unregisterised, but there do
exist registerised builds that disable tables-next-to-code! This patch
corrects that problem. Fixes #22896.
- - - - -
08c0822c by doyougnu at 2023-02-15T00:16:39-05:00
docs: release notes, user guide: add js backend
Follow up from #21078
- - - - -
79d8fd65 by Bryan Richter at 2023-02-15T00:17:15-05:00
Allow failure in nightly-x86_64-linux-deb10-no_tntc-validate
See #22343
- - - - -
9ca51f9e by Cheng Shao at 2023-02-15T00:17:53-05:00
rts: add the rts_clearMemory function
This patch adds the rts_clearMemory function that does its best to
zero out unused RTS memory for a wasm backend use case. See the
comment above rts_clearMemory() prototype declaration for more
detailed explanation. Closes #22920.
- - - - -
df5d755e by Ben Gamari at 2023-02-15T13:04:37-05:00
nonmoving: Fix style
- - - - -
a724c1e7 by Ben Gamari at 2023-02-15T13:04:37-05:00
nonmoving: Deduplicate assertion
- - - - -
b419ddce by Ben Gamari at 2023-02-15T13:04:37-05:00
rts: Fix type issues in Sparks.h
Adds explicit casts to satisfy a C++ compiler.
- - - - -
38e410d8 by Ben Gamari at 2023-02-15T13:04:37-05:00
rts: Use release ordering when storing thread labels
Since this makes the ByteArray# visible from other cores.
- - - - -
8ca9bce1 by Ben Gamari at 2023-02-15T13:04:38-05:00
rts/BlockAlloc: Allow disabling of internal assertions
These can be quite expensive and it is sometimes useful to compile a
DEBUG RTS without them.
- - - - -
1857019c by Ben Gamari at 2023-02-15T13:04:38-05:00
rts/Sanity: Mark pinned_object_blocks
- - - - -
1c8310b0 by Ben Gamari at 2023-02-15T13:04:38-05:00
rts/Sanity: Look at nonmoving saved_filled lists
- - - - -
c69b7d88 by Ben Gamari at 2023-02-15T13:04:38-05:00
Evac: Squash data race in eval_selector_chain
- - - - -
cb9aa754 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Clarify implementation
This makes the intent of this implementation a bit clearer.
- - - - -
0702f1f5 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Clarify comment
- - - - -
d4c796d3 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Add missing no-op in busy-wait loop
- - - - -
15b4774e by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Don't push empty arrays to update remembered set
Previously the write barrier of resizeSmallArray# incorrectly handled
resizing of zero-sized arrays, pushing an invalid pointer to the update
remembered set.
Fixes #22931.
- - - - -
6c420d05 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Fix handling of weak pointers
This fixes an interaction between aging and weak pointer handling which
prevented the finalization of some weak pointers. In particular, weak
pointers could have their keys incorrectly marked by the preparatory
collector, preventing their finalization by the subsequent concurrent
collection.
While in the area, we also significantly improve the assertions
regarding weak pointers.
Fixes #22327.
- - - - -
c8bf5d17 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Sanity check nonmoving large objects and compacts
- - - - -
32258e72 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Sanity check mutable list
Assert that entries in the nonmoving generation's generational
remembered set (a.k.a. mutable list) live in nonmoving generation.
- - - - -
4ad7a56d by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Don't show occupancy if we didn't collect live words
- - - - -
f7b4f73d by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Fix tracking of FILLED_SWEEPING segments
Previously we only updated the state of the segment at the head of each
allocator's filled list.
- - - - -
b5736bea by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Assert state of swept segments
- - - - -
25b64ba0 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Handle new closures in nonmovingIsNowAlive
We must conservatively assume that new closures are reachable since we
are not guaranteed to mark such blocks.
- - - - -
da488991 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Don't clobber update rem sets of old capabilities
Previously `storageAddCapabilities` (called by `setNumCapabilities`) would
clobber the update remembered sets of existing capabilities when
increasing the capability count. Fix this by only initializing the
update remembered sets of the newly-created capabilities.
Fixes #22927.
- - - - -
6c74ce6e by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Add missing write barriers in selector optimisation
This fixes the selector optimisation, adding a few write barriers which
are necessary for soundness. See the inline comments for details.
Fixes #22930.
- - - - -
ab44122f by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Post-sweep sanity checking
- - - - -
965eecc5 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Avoid n_caps race
- - - - -
f2498a95 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Don't push if nonmoving collector isn't enabled
- - - - -
9a5b6a78 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Be more paranoid in segment tracking
Previously we left various segment link pointers dangling. None of this
wrong per se, but it did make it harder than necessary to debug.
- - - - -
7743d699 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Sync-phase mark budgeting
Here we significantly improve the bound on sync phase pause times by
imposing a limit on the amount of work that we can perform during the
sync. If we find that we have exceeded our marking budget then we allow
the mutators to resume, return to concurrent marking, and try
synchronizing again later.
Fixes #22929.
- - - - -
4a33bb40 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Allow pinned gen0 objects to be WEAK keys
- - - - -
0599eea1 by Ben Gamari at 2023-02-15T13:04:38-05:00
rts: Reenable assertion
- - - - -
9b960226 by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Move current segment array into Capability
The current segments are conceptually owned by the mutator, not the
collector. Consequently, it was quite tricky to prove that the mutator
would not race with the collect due to this shared state. It turns out
that such races are possible: when resizing the current segment array
we may concurrently try to take a heap census. This will attempt to walk
the current segment array, causing a data race.
Fix this by moving the current segment array into `Capability`, where it
belongs.
Fixes #22926.
- - - - -
d474bd7c by Ben Gamari at 2023-02-15T13:04:38-05:00
nonmoving: Fix Note references
Some references to Note [Deadlock detection under the non-moving
collector] were missing an article.
- - - - -
2586a860 by Ben Gamari at 2023-02-15T13:04:38-05:00
rts/Sanity: Fix block count assertion with non-moving collector
The nonmoving collector does not use `oldest_gen->blocks` to track its
block list. However, it nevertheless updates `oldest_gen->n_blocks` to
ensure that its size is accounted for by the storage manager.
Consequently, we must not attempt to assert consistency between the two.
- - - - -
26f2d3cd by Ben Gamari at 2023-02-15T13:04:38-05:00
hadrian: Add +boot_nonmoving_gc flavour transformer
For using GHC bootstrapping to validate the non-moving GC.
- - - - -
b04f2a6e by Ben Gamari at 2023-02-15T13:04:38-05:00
gitlab-ci: Add job bootstrapping with nonmoving GC
- - - - -
0154039a by Ben Gamari at 2023-02-15T13:04:39-05:00
nonmoving: Don't call prepareUnloadCheck
When the nonmoving GC is in use we do not call `checkUnload` (since we
don't unload code) and therefore should not call `prepareUnloadCheck`,
lest we run into assertions.
- - - - -
214410e4 by Ben Gamari at 2023-02-15T13:04:39-05:00
rts: Encapsulate block allocator spinlock
This makes it a bit easier to add instrumentation on this spinlock
while debugging.
- - - - -
841e14de by Ben Gamari at 2023-02-15T13:04:39-05:00
testsuite: Skip some tests when sanity checking is enabled
- - - - -
af7848f3 by Ben Gamari at 2023-02-15T13:04:39-05:00
nonmoving: Fix unregisterised build
- - - - -
df6c9eda by Ben Gamari at 2023-02-15T13:04:39-05:00
nonmoving: Ensure that sanity checker accounts for saved_filled segments
- - - - -
30 changed files:
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/merge_request_templates/merge-request.md
- .gitlab/rel_eng/upload_ghc_libs.py
- compile_flags.txt
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/Exitify.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Driver/Config/Core/Opt/Simplify.hs
- compiler/GHC/Driver/Config/Stg/Pipeline.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Lexer.x
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a8f0b6ac647011d519835e4089251071a1d72492...df6c9edaa9f3bdf8a145d7d1cd9445944dbe5489
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a8f0b6ac647011d519835e4089251071a1d72492...df6c9edaa9f3bdf8a145d7d1cd9445944dbe5489
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/20230215/00ad39f9/attachment-0001.html>
More information about the ghc-commits
mailing list