| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
These tests were originally written against the GHC2021 language.
|
|
|
|
|
| |
Signed-off-by: Emily Martins <emily.flakeheart@gmail.com>
(cherry picked from commit 05ae47721d05cd35b7a67dac054f0ab483a4ca28)
|
|
|
|
|
|
|
|
| |
Fixes #20042
Signed-off-by: Emily Martins <emily.flakeheart@gmail.com>
Signed-off-by: Hécate Moonlight <hecate@glitchbra.in>
(cherry picked from commit d455c39e93881dc3810ecc16a2f1bfd6c4e2fcdd)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `prepare_build_mk` created a build.mk that was overwritten right
after.
This makes the BIGNUM_BACKEND choice take effect, fixing #19953, and
causing the metric increase below in the integer-simple job.
Metric Increase:
space_leak_001
(cherry picked from commit 87f57ecf2523e83d8dd9cad919a6f2010f630ad0)
|
|
|
|
|
|
| |
Fix #20066
(cherry picked from commit a820f9002d8f75385aaaa141ac3c6f001e8a9874)
|
|
|
|
| |
(cherry picked from commit 4023d4d96a9492eb686883539153b2be7d23e1c7)
|
|
|
|
| |
(cherry picked from commit 74c874148fbea996cadf1d9fa50f2a44488dd82b)
|
|
|
|
|
|
| |
Fixes #19852 and #19609
(cherry picked from commit 6a577cf0edb38577e703c9523a4307ae9fa7576d)
|
|
|
|
| |
(cherry picked from commit 3f60a7e59dc5e067a3c764799478645dbc37700d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exprConApp_maybe
For example:
"\0" is encoded to "C0 80", then the rule would correct use a decoding
function to work out the first character was "C0 80" but then just used
BS.tail so the rest of the string was "80". This resulted in
"\0" being transformed into '\C0\80' : unpackCStringUTF8# "80"
Which is obviously bogus.
I rewrote the function to call utf8UnconsByteString directly and avoid
the roundtrip through Faststring so now the head/tail is computed by the
same call.
Fixes #19976
(cherry picked from commit 7f6454fb8cd92b2b2ad4e88fa6d81e34d43edb9a)
|
|
|
|
|
|
|
|
| |
Previously we branched unnecessarily on
IF_NONMOVING_WRITE_BARRIER_ENABLED on every trip through the array
barrier push loop.
(cherry picked from commit 30f233fe8a0342abbafa2b785a32615bace9492f)
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the code generator's logic for invoking the nonmoving write
barrier was inconsistent with the write barrier itself. Namely, the code
generator treated the header size argument as being in words whereas the
barrier expected bytes. This was the cause of #19715.
Fixes #19715.
(cherry picked from commit 221a104f44fdf58e4514d41ae827747c2bf938c8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Pthread based timer was initialized started while some other parts of
the RTS assume it is initialized stopped, e.g. in hs_init_ghc:
/* Start the "ticker" and profiling timer but don't start until the
* scheduler is up. However, the ticker itself needs to be initialized
* before the scheduler to ensure that the ticker mutex is initialized as
* moreCapabilities will attempt to acquire it.
*/
* after a fork, don't start the timer before the IOManager is
initialized: the timer handler (handle_tick) might call wakeUpRts to
perform an idle GC, which calls wakeupIOManager/ioManagerWakeup
Found while debugging #18033/#20132 but I couldn't confirm if it fixes
them.
|
|
|
|
|
|
|
|
| |
We need to be careful about the sign bit for BR26 relocation
otherwise we end up encoding a large positive number and reading
back a large negative number.
(cherry picked from commit d6ab9c60288369ec991826b158d751dd4cb3319e)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change aims to make source files relocatable w.r.t. to the interface files produced by the compiler.
This is so that we can download interface files produced by a cloud build system and then reuse them in a local ghcide session
catch another case of implicit includes
actually use the implicit quote includes
add another missing case
recomp020
test that .hi files are reused even if .hs files are moved to a new location
Added recomp021 to record behaviour with non implicit includes
add a note
additional pointer to the note
Mention #16956 in Note
(cherry picked from commit 9faafb0aaff04e86a58b9e108f84618b12f2057c)
|
|
|
|
|
|
|
| |
Fixes #19849
Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
(cherry picked from commit c4099b0908e3f4ae04312ca82af147eb1585cd09)
|
|
|
|
| |
(cherry picked from commit df4a0a53691cd833f54eb443401243dd9c964196)
|
|
|
|
|
|
|
|
| |
This allows to start iserv by passing port 0 to startSlave,
which in turns allows to get an available port when no
port is known to be free a priori.
(cherry picked from commit b39dec86df8106a2bb4770758941572073ad57a2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #19822, we realised that the Simplifier's new habit of floating cases into
`runRW#` continuations inhibits CPR analysis from giving key functions of `text`
the CPR property, such as `singleton`.
This patch fixes that by anticipating part of !5667 (Nested CPR) to give
`runRW#` the proper CPR transformer it now deserves: Namely, `runRW# (\s -> e)`
should have the CPR property iff `e` has it.
The details are in `Note [Simplification of runRW#]` in GHC.CoreToStg.Prep.
The output of T18086 changed a bit: `panic` (which calls `runRW#`) now has
`botCpr`. As outlined in Note [Bottom CPR iff Dead-Ending Divergence], that's
OK.
Fixes #19822.
Metric Decrease:
T9872d
(cherry picked from commit b0df2f012ede2f9017577198b5285ca6015b582b)
|
|
|
|
| |
(cherry picked from commit 398994e19699f788a7810b4044e7aa817a10e73e)
|
|
|
|
|
|
|
|
|
|
|
| |
We need to match on DataCon workers for the rules to be triggered.
T13701 ghc/alloc decreases by ~2.5% on some archs
Metric Decrease:
T13701
(cherry picked from commit 2d9c806988ac6027930f25801f1cce080df3b037)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Also replace `name'` with 'name''. The latter works more consistently.
The sequencing of monadic effects in foldlM and foldrM was described as
respectively right-associative and left-associative, but this could be
confusing, as in essence we're just composing Kleisli arrows, whose
composition is simply associative.
What matters therefore is the order of sequencing of effects, which
can be described more clearly without dragging in associativity as
such.
This avoids describing these folds as being both left-to-right and
right-to-left depending on whether we're tracking effects or operator
application. The new text should be easier to understand.
|
|
|
|
|
|
| |
See #15304.
(cherry picked from commit 3339ed49b103d5aab42733dfb434de3a9a27bf2b)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was that ghci inserts some ticks around the crucial bit of
the expression. Just like in some of the other rules we now strip the
ticks so that the rule fires more reliably.
It was possible to defeat magicDict by using -fhpc as well, so not just an
issue in ghci.
Fixes #19667 and related to #19673
(cherry picked from commit 6974c9e478120f6c4eeb53ebfa935c30cafcdf8e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main idea here is to avoid treating
* case e of {}
* case unsafeEqualityProof of UnsafeRefl co -> blah
specially in CoreToStg. Instead, nail them in CorePrep,
by converting
case e of {}
==> e |> unsafe-co
case unsafeEqualityProof of UnsafeRefl cv -> blah
==> blah[unsafe-co/cv]
in GHC.Core.Prep. Now expressions that we want to treat as trivial
really are trivial. We can get rid of cpExprIsTrivial.
And we fix #19700.
A downside is that, at least under unsafeEqualityProof, we substitute
in types and coercions, which is more work. But a big advantage is
that it's all very simple and principled: CorePrep really gets rid of
the unsafeCoerce stuff, as it does empty case, runRW#, lazyId etc.
I've updated the overview in GHC.Core.Prep, and added
Note [Unsafe coercions] in GHC.Core.Prep
Note [Implementing unsafeCoerce] in base:Unsafe.Coerce
We get 3% fewer bytes allocated when compiling perf/compiler/T5631,
which uses a lot of unsafeCoerces. (It's a happy-generated parser.)
Metric Decrease:
T5631
(cherry picked from commit 6c7fff0b6f9514d6572cbe6bbfa4aafc259caebe)
|
|
|
|
|
|
|
|
|
|
| |
Previously we would check only that the *start* of the mapping was in
the bottom 32-bits of address space. However, we need the *entire*
mapping to be in low memory. Fix this.
Noticed by @Phyx.
(cherry picked from commit 72c1812feecd2aff2a96b629063ba90a2f4cdb7b)
|
|
|
|
|
|
|
| |
Since `GeneralizedNewtypeDeriving` is considered unsafe, `DerivingVia`
should be as well.
(cherry picked from commit 0281dae8b3fe3384939c415ae72ca2440b3cafb3)
|
|
|
|
| |
(cherry picked from commit 9f9fab1531d62f6d30c853722548393be264120b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Unarise would happily project lifted and unlifted fields
to lifted slots. This broke horribly in #19645, where a ByteArray# was
passed in a lifted slot and consequently entered. The simplest way to
fix this is what I've done here, distinguishing between lifted and
unlifted slots in unarise.
However, one can imagine more clever solutions, where we coerce the
binder to the correct levity with respect to the sum's tag. I doubt that
this would be worth the effort.
Fixes #19645.
(cherry picked from commit 721ea018712606b9feddf09c130552ed981b4900)
|
|
|
|
| |
(cherry picked from commit a951e06921f05df1601d9c3a39efcede27f3330c)
|
|
|
|
|
|
|
|
| |
Previously -ddump-inlinings and -dverbose-core2core used in conjunction
would have the side-effect of dumping additional information about all
inlinings considered by the simplifier. However, I have sometimes wanted
this inlining information without the firehose of information produced by
-dverbose-core2core. Introduce a new dump flag for this purpose.
|
|
|
|
|
|
| |
Otherwise `opt` fails with:
error: use of undefined value '@memcmp$def'
|
|
|
|
| |
Also nested foldr example for `concat`.
|
|
|
|
|
| |
_POSIX_SOURCE is too strict, we need _DARWIN_C_SOURCE, otherwise
<pthread.h> does not expose pthread_setname_np(3).
|
|
|
|
|
|
|
|
| |
This avoids surprises in the non-threaded runtime with blocked signals killing
the process because they're only blocked in the main thread and not in the
ticker thread.
Also backport improved compile-time detection of pthread_setname_np() and/or
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's surprisingly tricky to deal with 'main' (#19397). This
patch does quite bit of refactoring do to it right. Well,
more-right anyway!
The moving parts are documented in GHC.Tc.Module
Note [Dealing with main]
Some other oddments:
* Rename tcRnExports to rnExports; no typechecking here!
* rnExports now uses checkNoErrs rather than failIfErrsM;
the former fails only if rnExports itself finds errors
* Small improvements to tcTyThingCategory, which ultimately
weren't important to the patch, but I've retained as
a minor improvement.
|
|
|
|
|
|
| |
Fixes #19455.
(cherry picked from commit 8e3f736d96aaf008e2058754e34bef89ba8c8661)
|
|
|
|
|
| |
This isn't necessary for `master` but will be backported to ghc-9.0 and
will likely be useful in the future.
|
|
|
|
| |
See #15304.
|
|
|
|
| |
(cherry picked from commit dd6640316865d84075b00013b8b97076705e5c44)
|
|
|
|
|
|
|
|
| |
Previously hadrian would use GHC on PATH when configuring packages (or
fail if there is no such GHC). Fix this. Unfortunately this runs into
another bug in Cabal which we workaround.
(cherry picked from commit 4ce9fe88e7e98178d5fd6b18ac9cba666a1f8306)
|
|
|
|
|
|
|
| |
We now generate our Docker images via Dhall definitions, as described in
ghc/ci-images!52. Additionally, we are far more careful about where tools
come from, using the ALEX, HAPPY, HSCOLOR, and GHC environment variables
(set in the Dockerfiles) to find bootstrapping tools.
|
|
|
|
|
|
| |
Fixes #17895.
(cherry picked from commit ede60537b9c6827063734312d8068a7d30b89dd5)
|
|
|
|
| |
(cherry picked from commit 18e106a8dfdae50c3078558382209f53794a8c97)
|
|
|
|
| |
(cherry picked from commit 06beed685a69ed044159707363a791fd266f069b)
|
|
|
|
|
|
|
|
|
|
| |
Solves #19147. When n_capabilities > 1 we were not correctly accounting
for gc time for sequential collections. In this case par_n_gcthreads ==
1, however it is not guaranteed that the single gc thread is capability 0.
A similar issue for copied is addressed as well.
(cherry picked from commit f49d6fb27336297d6d7a46269a22dd98c131b4a8)
|
|
|
|
| |
(cherry picked from commit 9b7dcd80f16efda57e4e51e39d61b55a11c72014)
|
|
|
|
| |
(cherry picked from commit 16a69eafc35eabd1cf579187e980eab685e1d2e1)
|
|
|
|
|
|
|
| |
The previous code using TyCoMapper could promote the same metavar twice.
Use a set instead.
(cherry picked from commit b8d40af138fe0f7fad9b6afafe2152d8213a3e25)
|