[Git][ghc/ghc][wip/t23103] 26 commits: Don't attempt pattern synonym error recovery
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Thu Aug 24 14:13:59 UTC 2023
Matthew Pickering pushed to branch wip/t23103 at Glasgow Haskell Compiler / GHC
Commits:
e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00
Don't attempt pattern synonym error recovery
This commit gets rid of the pattern synonym error recovery mechanism
(recoverPSB). The rationale is that the fake pattern synonym binding
that the recovery mechanism introduced could lead to undesirable
knock-on errors, and it isn't really feasible to conjure up a
satisfactory binding as pattern synonyms can be used both in expressions
and patterns.
See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn.
It isn't such a big deal to eagerly fail compilation on a pattern synonym
that doesn't typecheck anyway.
Fixes #23467
- - - - -
6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00
base: Don't use Data.ByteString.Internals.memcpy
This function is now deprecated from `bytestring`. Use
`Foreign.Marshal.Utils.copyBytes` instead.
Fixes #23880.
- - - - -
0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Uniformly pass buildOptions to all builders in runBuilder
In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo.
This leads to hard to diagnose bugs as any build options you pass with
runBuilderWithCmdOptions are ignored for many builders.
Solution: Uniformly pass buildOptions to the invocation of cmd.
Fixes #23845
- - - - -
9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Abstract windows toolchain setup
This commit splits up the windows toolchain setup logic into two
functions.
* FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if
it isn't already downloaded
* FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point
to the correct place
FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw
toolchain and also the eventual location where we will install the
toolchain in the installed bindist.
This is the first step towards #23608
- - - - -
6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Generate build.mk for bindists
The config.mk.in script was relying on some variables which were
supposed to be set by build.mk but therefore never were when used to
install a bindist.
Specifically
* BUILD_PROF_LIBS to determine whether we had profiled libraries or not
* DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or
not
Not only were these never set but also not really accurate because you
could have shared libaries but still statically linked ghc executable.
In addition variables like GhcLibWays were just never used, so those
have been deleted from the script.
Now instead we generate a build.mk file which just directly specifies
which RtsWays we have supplied in the bindist and whether we have
DYNAMIC_GHC_PROGRAMS.
- - - - -
fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add reloc-binary-dist-* targets
This adds a command line option to build a "relocatable" bindist.
The bindist is created by first creating a normal bindist and then
installing it using the `RelocatableBuild=YES` option. This creates a
bindist without any wrapper scripts pointing to the libdir.
The motivation for this feature is that we want to ship relocatable
bindists on windows and this method is more uniform than the ad-hoc
method which lead to bugs such as #23608 and #23476
The relocatable bindist can be built with the "reloc-binary-dist" target
and supports the same suffixes as the normal "binary-dist" command to
specify the compression style.
- - - - -
41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00
packaging: Fix installation scripts on windows/RelocatableBuild case
This includes quite a lot of small fixes which fix the installation
makefile to work on windows properly. This also required fixing the
RelocatableBuild variable which seemed to have been broken for a long
while.
Sam helped me a lot writing this patch by providing a windows machine to
test the changes. Without him it would have taken ages to tweak
everything.
Co-authored-by: sheaf <sam.derbyshire at gmail.com>
- - - - -
03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00
ci: Build relocatable bindist on windows
We now build the relocatable bindist target on windows, which means we
test and distribute the new method of creating a relocatable bindist.
- - - - -
d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add error when trying to build binary-dist target on windows
The binary dist produced by `binary-dist` target doesn't work on windows
because of the wrapper script the makefile installs. In order to not
surprise any packagers we just give an error if someone tries to build
the old binary-dist target rather than the reloc-binary-dist target.
- - - - -
7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Remove query' logic to use tooldir
- - - - -
03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00
configure: Set WindresCmd directly and removed unused variables
For some reason there was an indirection via the Windres variable before
setting WindresCmd. That indirection led to #23855.
I then also noticed that these other variables were just not used
anywhere when trying to work out what the correct condition was for this
bit of the configure script.
- - - - -
c82770f5 by sheaf at 2023-08-23T13:43:48-04:00
Apply shellcheck suggestion to SUBST_TOOLDIR
- - - - -
896e35e5 by sheaf at 2023-08-23T13:44:34-04:00
Compute hints from TcSolverReportMsg
This commit changes how hints are handled in conjunction with
constraint solver report messages.
Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor,
we compute the hints depending on the underlying TcSolverReportMsg.
This disentangles the logic and makes it easier to add new hints for
certain errors.
- - - - -
a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00
users-guide: remove note about fatal Haddock parse failures
- - - - -
4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Introduce Data.Enum
- - - - -
f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Integer
- - - - -
b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num
- - - - -
6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Natural
- - - - -
2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Float
- - - - -
f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Real
- - - - -
94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Eliminate module reexport in GHC.Exception
The metric increase here isn't strictly due to this commit but it's a
rather small, incidental change.
Metric Increase:
T8095
T13386
Metric Decrease:
T8095
T13386
T18304
- - - - -
be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add disclaimers in internal modules
To warn users that these modules are internal and their interfaces may
change with little warning.
As proposed in Core Libraries Committee #146 [CLC146].
[CLC146]: https://github.com/haskell/core-libraries-committee/issues/146
- - - - -
0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00
Bump Cabal submodule
We need to bump the Cabal submodule to include commit ec75950
which fixes an issue with a dodgy import Rep(..) which relied
on GHC bug #23570
- - - - -
0504cd08 by Facundo DomÃnguez at 2023-08-23T17:38:11-04:00
Fix typos in the documentation of Data.OldList.permutations
- - - - -
231e357d by Finley McIlwaine at 2023-08-24T14:13:56+00:00
Refactor estimation of stack info table provenance
This commit greatly refactors the way we compute estimated provenance for stack
info tables. Previously, this process was done using an entirely separate traversal
of the whole Cmm code stream to build the map from info tables to source locations.
The separate traversal is now fused with the Cmm code generation pipeline in
GHC.Driver.Main.
This results in very significant code generation speed ups when -finfo-table-map is
enabled. In testing, this patch reduces code generation times by almost 30% with
-finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 .
Fixes #23103
- - - - -
bb0225c6 by Finley McIlwaine at 2023-08-24T14:13:56+00:00
Add a test checking overhead of -finfo-table-map
We want to make sure we don't end up with poor codegen performance resulting from
-finfo-table-map again as in #23103. This test adds a performance test tracking
total allocations while compiling ExactPrint with -finfo-table-map.
- - - - -
30 changed files:
- .gitlab/ci.sh
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/using.rst
- hadrian/README.md
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/src/Builder.hs
- hadrian/src/Hadrian/Builder/Ar.hs
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Generate.hs
- libraries/Cabal
- + libraries/base/Data/Enum.hs
- libraries/base/Data/OldList.hs
- libraries/base/GHC/Arr.hs
- libraries/base/GHC/Conc.hs
- libraries/base/GHC/Conc/IO.hs
- libraries/base/GHC/Desugar.hs
- libraries/base/GHC/Encoding/UTF8.hs
- libraries/base/GHC/Event/TimeOut.hs
- libraries/base/GHC/Exception.hs
- libraries/base/GHC/Exception/Type.hs
- libraries/base/GHC/ExecutionStack/Internal.hsc
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1c36c6ee867fc756f98fafcd2c18b42c14b1a1a7...bb0225c635588e815685126291531de55ba6c7db
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1c36c6ee867fc756f98fafcd2c18b42c14b1a1a7...bb0225c635588e815685126291531de55ba6c7db
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/20230824/010cb241/attachment-0001.html>
More information about the ghc-commits
mailing list