[Git][ghc/ghc][wip/reinstallable-th] 42 commits: Document NcgImpl methods
Teo Camarasu (@teo)
gitlab at gitlab.haskell.org
Tue May 14 10:18:24 UTC 2024
Teo Camarasu pushed to branch wip/reinstallable-th at Glasgow Haskell Compiler / GHC
Commits:
b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00
Document NcgImpl methods
Fixes #19914
- - - - -
4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00
Make renamer to be more flexible with parens in the LHS of the rules
We used to reject LHS like `(f a) b` in RULES and requires it to be written as
`f a b`. It will be handy to allow both as the expression may be more
readable with extra parens in some cases when infix operator is involved.
Espceially when TemplateHaskell is used, extra parens may be added out of
user's control and result in "valid" rules being rejected and there
are not always ways to workaround it.
Fixes #24621
- - - - -
ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00
IPE: Eliminate dependency on Read
Instead of encoding the closure type as decimal string we now simply
represent it as an integer, eliminating the need for `Read` in
`GHC.Internal.InfoProv.Types.peekInfoProv`.
Closes #24504.
-------------------------
Metric Decrease:
T24602_perf_size
size_hello_artifact
-------------------------
- - - - -
a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00
testsuite: fix testwsdeque with recent clang
This patch fixes compilation of testwsdeque.c with recent versions of
clang, which will fail with the error below:
```
testwsdeque.c:95:33: error:
warning: format specifies type 'long' but the argument has type 'void *' [-Wformat]
95 | barf("FAIL: %ld %d %d", p, n, val);
| ~~~ ^
testwsdeque.c:95:39: error:
warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat]
95 | barf("FAIL: %ld %d %d", p, n, val);
| ~~ ^~~
| %lu
testwsdeque.c:133:42: error:
error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types]
133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n);
| ^~~~~
/workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error:
note: passing argument to parameter 'startProc' here
193 | OSThreadProc *startProc, void *param);
| ^
2 warnings and 1 error generated.
```
- - - - -
c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00
Rename pre-processor invocation args
Small clean up. Uses proper names for the various groups of arguments
that make up the pre-processor invocation.
- - - - -
2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00
ghc-heap: fix typo in ghc-heap cbits
- - - - -
fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00
Improve performance of Data.List.sort(By)
This patch improves the algorithm to sort lists in base.
It does so using two strategies:
1) Use a four-way-merge instead of the 'default' two-way-merge.
This is able to save comparisons and allocations.
2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization.
This mainly benefits types with a fast (>).
Note that this *may* break instances with a *malformed* Ord instance
where `a > b` is *not* equal to `compare a b == GT`.
CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236
Fixes #24280
-------------------------
Metric Decrease:
MultiLayerModulesTH_Make
T10421
T13719
T15164
T18698a
T18698b
T1969
T9872a
T9961
T18730
WWRec
T12425
T15703
-------------------------
- - - - -
1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00
Revert "ghcup-metadata: Drop output_name field"
This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f.
This breaks the ghcup metadata generation on the nightly jobs.
- - - - -
daff1e30 by Jannis at 2024-05-12T13:38:35-04:00
Division by constants optimization
- - - - -
413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00
Tidy: Add flag to expose unfoldings if they take dictionary arguments.
Add the flag `-fexpose-overloaded-unfoldings` to be able to control this
behaviour.
For ghc's boot libraries file size grew by less than 1% when it was
enabled. However I refrained from enabling it by default for now.
I've also added a section on specialization more broadly to the users
guide.
-------------------------
Metric Decrease:
MultiLayerModulesTH_OneShot
Metric Increase:
T12425
T13386
hard_hole_fits
-------------------------
- - - - -
c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00
Don't store a GlobalRdrEnv in `mi_globals` for GHCi.
GHCi only needs the `mi_globals` field for modules imported with
:module +*SomeModule.
It uses this field to make the top level environment in `SomeModule` available
to the repl.
By default, only the first target in the command line parameters is
"star" loaded into GHCi. Other modules have to be manually "star" loaded
into the repl.
Storing the top level GlobalRdrEnv for each module is very wasteful, especially
given that we will most likely never need most of these environments.
Instead we store only the information needed to reconstruct the top level environment
in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements
as well as all top level symbols defined in the module (not taking export lists into account)
When a particular module is "star-loaded" into GHCi (as the first commandline target, or via
an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using
the `IfaceTopEnv`.
- - - - -
d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00
Add perf regression test for `-fwrite-if-simplified-core`
- - - - -
2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00
Improve pattern to type pattern transformation (23739)
`pat_to_type_pat` function now can handle more patterns:
- TuplePat
- ListPat
- LitPat
- NPat
- ConPat
Allowing these new constructors in type patterns significantly
increases possible shapes of type patterns without `type` keyword.
This patch also changes how lookups in `lookupOccRnConstr` are
performed, because we need to fall back into
types when we didn't find a constructor on data level to perform
`ConPat` to type transformation properly.
- - - - -
be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00
hadrian: fix hadrian building with ghc-9.10.1
- - - - -
ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00
linters: fix lint-whitespace compilation with ghc-9.10.1
- - - - -
7fc9b407 by Teo Camarasu at 2024-05-14T10:15:18+01:00
Make template-haskell reinstallable
- - - - -
f0d0909a by Teo Camarasu at 2024-05-14T10:15:18+01:00
Split out GHC.Internal.TH.Lift
- - - - -
6a369a1f by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move MonadIO to ghc-internal
- - - - -
cde60333 by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move GHC.Internal.Syntax into ghc-internal
- - - - -
d2f4926d by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move GHC.Lexeme into ghc-internal
- - - - -
316d4bc8 by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move GHC.Internal.TH.Lib to ghc-internal
- - - - -
5a5b53a8 by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move GHC.Internal.TH.Lift to ghc-internal
- - - - -
e6d1f2d9 by Teo Camarasu at 2024-05-14T10:15:19+01:00
Move GHC.Internal.TH.Quote to ghc-internal
- - - - -
60e11bab by Teo Camarasu at 2024-05-14T10:17:12+01:00
Drop thUnit/thUnitId
- - - - -
8c73a955 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update Safe/trustworthy annotations
- - - - -
45a46e36 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update test outputs
- - - - -
45792c96 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Rename modules moved to ghc-internal to start with GHC.Internal
We re-expose the old names from ghc-boot-th for backcompat
- - - - -
a99901e4 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update docs
- - - - -
9efaf465 by Teo Camarasu at 2024-05-14T10:17:14+01:00
mark as safe
- - - - -
b6229ac4 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update bootstrapping flag doc
- - - - -
6a962773 by Teo Camarasu at 2024-05-14T10:17:14+01:00
remove accidentally committed file
- - - - -
424a4515 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Fix formatting
- - - - -
4f677cef by Teo Camarasu at 2024-05-14T10:17:14+01:00
Drop ghc-boot-th-next logic
This is no longer necessary as this package is reinstallable
- - - - -
353989a5 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Make sure to import TH.Lib in TH.Lift!
- - - - -
3debc408 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Remove redundant import/comment
- - - - -
16bc3151 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update Note [Tracking dependencies on primitives]
- - - - -
e466e9c8 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Move quoteFile to `template-haskell`
- - - - -
b24a2826 by Teo Camarasu at 2024-05-14T10:17:14+01:00
Revert "Drop ghc-boot-th-next logic"
This reverts commit 635bdd20ea0ce61c143695894364891d80f150f2.
- - - - -
511e26bd by Teo Camarasu at 2024-05-14T10:17:14+01:00
Remove reference to template-haskell-next in .gitignore
- - - - -
5b1335bf by Teo Camarasu at 2024-05-14T10:17:14+01:00
Update bootstrapping TH note
- - - - -
6ac9400d by Teo Camarasu at 2024-05-14T11:18:16+01:00
Add back addrToByteArrayName
- - - - -
f2650ceb by Teo Camarasu at 2024-05-14T11:18:16+01:00
Fix since pragmas
- - - - -
30 changed files:
- .gitignore
- .gitlab/ci.sh
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC.hs
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/Config.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/CmmToAsm/AArch64/RegInfo.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/Config/Cmm.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Env.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/78db946cbbc0ba71839ddccf5ce4198efe12764f...f2650ceb7a45571714e3aad22481614e48ee2808
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/78db946cbbc0ba71839ddccf5ce4198efe12764f...f2650ceb7a45571714e3aad22481614e48ee2808
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/20240514/b4042296/attachment-0001.html>
More information about the ghc-commits
mailing list