| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(cherry picked from commit 2a7e29e5303058473484b10ed57d3c579d78fe83)
|
|
|
|
| |
(cherry picked from commit ecc3a405bb961cf45a4eaef36991a07321989474)
|
|
|
|
| |
(cherry picked from commit 4db2d44ccbd0b615f41487bae082d1d14d37ecce)
|
|
|
|
| |
(cherry picked from commit a1fed3a51b9216ad072a0d57e32a0eaab44f9476)
|
|
|
|
| |
(cherry picked from commit 1b2f894f47c54c6e921931351eba36842c345caf)
|
|
|
|
| |
(cherry picked from commit db1e07f13a7ec6cde2918c435fa422062c49f536)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In which we add a new code generator to the Glasgow Haskell
Compiler. This codegen supports ELF and Mach-O targets, thus covering
Linux, macOS, and BSDs in principle. It was tested only on macOS and
Linux. The NCG follows a similar structure as the other native code
generators we already have, and should therfore be realtively easy to
follow.
It supports most of the features required for a proper native code
generator, but does not claim to be perfect or fully optimised. There
are still opportunities for optimisations.
Metric Decrease:
ManyAlternatives
ManyConstructors
MultiLayerModules
PmSeriesG
PmSeriesS
PmSeriesT
PmSeriesV
T10421
T10421a
T10858
T11195
T11276
T11303b
T11374
T11822
T12227
T12545
T12707
T13035
T13253
T13253-spj
T13379
T13701
T13719
T14683
T14697
T15164
T15630
T16577
T17096
T17516
T17836
T17836b
T17977
T17977b
T18140
T18282
T18304
T18478
T18698a
T18698b
T18923
T1969
T3064
T5030
T5321FD
T5321Fun
T5631
T5642
T5837
T783
T9198
T9233
T9630
T9872d
T9961
WWRec
Metric Increase:
T4801
(cherry picked from commit 3b1aa7dba7c006b473855a6b199b15fa3a3d77a0)
|
|
|
|
|
|
| |
It isn't used for anything anymore
(cherry picked from commit 2cdc95f9c068421a55c634933ab2d8596eb992fb)
|
|
|
|
| |
(cherry picked from commit b699c4fb0d23616a20d160f04a893f514fc7e38c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we switch from reading the globally installed
platformConstants file to reading the DerivedConstants.h header file
that is bundled in the RTS unit. When we build the RTS unit itself, we
get it from its includes directories.
The new parser is more efficient and strict than the Read instance for
PlatformConstants and we get about 2.2MB less allocations in every
cases. However it only really shows in tests that don't allocate much,
hence the following metric decreases.
Metric Decrease:
Naperian
T10421
T10547
T12150
T12234
T12425
T13035
T18304
T18923
T5837
T6048
T18140
T14697
(cherry picked from commit 085983e63bfe6af23f8b85fbfcca8db4872d2f60)
|
|
|
|
|
|
|
|
| |
deriveConstants utility now generates a Haskell parser for
DerivedConstants.h. It can be used to replace the one used to read
platformConstants file.
(cherry picked from commit 9c762f27d5468ab692e390b16420c9e304993993)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dynamic-by-default was a mechanism to automatically select the -dynamic
way for some targets.
It was implemented in a convoluted way: it was defined as a flavour
option, hence it couldn't be passed as a global settings (which are
produced by `configure` before considering flavours), so a build system
rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that
deriveConstants could infer it.
* Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de)
* It has never been implemented in Hadrian
* Last time someone tried to enable it 1 year ago it didn't work (!2436)
* Having this as a global constant impedes making GHC multi-target (see !5427)
This commit fully removes support for dynamic-by-default. If someone
wants to reimplement something like this, it would probably need to move
the logic in the compiler.
(Doing this would probably need some refactoring of the way the compiler
handles DynFlags: DynFlags are used to store and to pass enabled ways to
many parts of the compiler. It can be set by command-line flags, GHC
API, global settings. In multi-target GHC, we will use DynFlags to load
the target platform and its constants: but at this point with the
current DynFlags implementation we can't easily update the existing
DynFlags with target-specific options such as dynamic-by-default without
overriding ways previously set by the user.)
(cherry picked from commit d014ab0db0c167ab5a0f9cb15280aee6fd8f3621)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Progress towards #19026
(cherry picked from commit c6de580547728ddfc20a3a0914bc767a282c24ec)
|
|
|
|
|
|
| |
Follow-up from !2418, see #19579
(cherry picked from commit ad5a3aeb1d3094acbc17f07a2cc8388676d59dd1)
|
|
|
|
|
|
|
| |
Since `GeneralizedNewtypeDeriving` is considered unsafe, `DerivingVia`
should be as well.
(cherry picked from commit 0281dae8b3fe3384939c415ae72ca2440b3cafb3)
|
|
|
|
|
|
|
|
|
| |
The SrcSpan for a type family declaration did not include the family
equations.
Closes #19821
(cherry picked from commit c34f4c0cf55ac5c81b6600daab2a66e0adf89f50)
|
|
|
|
|
| |
This patch adds OverloadedRecordDot and OverloadedRecordUpdate in
9.2.1's release note.
|
|
|
|
|
|
| |
Closes #19814
(cherry picked from commit c3868451e974ee16762a1804d568afea8ed691c7)
|
|
|
|
|
|
|
|
|
| |
This clearly identifies the presence and location of optional
semicolons in an if statement.
Closes #19813
(cherry picked from commit 32367cac4e586fb5aedaa021b257388392d976c4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the fragment
blah = do {
; print "a"
; print "b"
}
capture the leading semicolon before 'print "a"' in
'al_rest' in AnnList instead of in 'al_trailing'.
Closes #19798
(cherry picked from commit 736d47ffb7370ba4348b142c913b88e4c82347d0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the source
module MatchSemis where
{
a 0 = 1;
a _ = 2;
}
Make sure that the AddSemiAnn entries for the two trailing semicolons
are attached to the component Match elements.
Closes #19784
(cherry picked from commit 1635d5c229a3ea0bc8e0ee862948cda2c435221a)
|
|
|
|
| |
(cherry picked from commit e61d2d47c4942c829ec98016be5aa5ae36982524)
|
|
|
|
| |
(cherry picked from commit 2d2985a79eec3d6ae9aee96b264c97c2b158f196)
|
|
|
|
|
|
|
| |
This fixes an oversight in the implementation of `extract_lctxt` which
was introduced in commit ce85cffc. Fixes #19759.
(cherry picked from commit c2541c49f162f1d03b0ae55f47b9c76cc96df76f)
|
|
|
|
| |
(cherry picked from commit 0165b0295c81247ae97a4689ae6e1fbd2fbc9311)
|
|
|
|
| |
(cherry picked from commit b51897494a65a6478d2ca60a4fbbec945ae27627)
|
|
|
|
|
|
|
| |
Point out that GHC2021 doesn't offer the same degree of stability that
Haskell2010 does, as noted by @phadej.
(cherry picked from commit 78288b97f3486d79581343a40732804d96b3b57c)
|
|
|
|
| |
(cherry picked from commit a42346970839feffdae6e5a570bde71a91ef8491)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 9d34f4546ab54c3dbb8f7be8f3e855d370592e8d)
|
|
|
|
|
|
| |
See #15304.
(cherry picked from commit 3339ed49b103d5aab42733dfb434de3a9a27bf2b)
|
|
|
|
| |
(cherry picked from commit a951e06921f05df1601d9c3a39efcede27f3330c)
|
|
|
|
|
|
| |
Also includes small unrelated type fix
(cherry picked from commit 70c39e220aa75608e277f311b53f8428c2abc4ff)
|
|
|
|
| |
(cherry picked from commit 045e5f49f81f98b8cfaeee08b572617a173f33da)
|
|
|
|
| |
This reverts commit 07f8e38f39af84601bb663460de0c5227d8b54e5.
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 2783d4981e4079f87a9d06036ea393949a5580b9)
|
|
|
|
|
|
| |
This prohuibits CC=clang to work generically and will always bake
in the clang that is found on the build machine in PATH, what ever
clang that might be. It might not even be on the final host.
|
|
|
|
| |
This should prevent some other `bash` to leak into the binary distributions.
|
|
|
|
| |
Also while we are at it, run shellcheck on ci.sh
|
|
|
|
| |
Also make sure to be able to build with non-apple-clang, while using apple's SDK on macOS
|
|
|
|
| |
This is so awful, but at least it might get the job done.
|
|
|
|
|
| |
We pull dependencies (reliably) via nix, and open up nix where
needed.
|
|
|
|
| |
Fixes #19631.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously Hadrian depended implicitly upon whatever `bash` it found in
`PATH`, offerring no way for the user to override. Fix this by detecting
`sh` in `configure` and passing the result to Hadrian.
Fixes #19797.
(cherry picked from commit bf34a310a19c1f8f1c8f9686a077d5c04a1510cf)
|