[Git][ghc/ghc][wip/hadrian-cross-stage2] 47 commits: EPA Some tweaks to annotations
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Mon Nov 6 17:50:26 UTC 2023
Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC
Commits:
de78b32a by Alan Zimmerman at 2023-10-23T09:09:41-04:00
EPA Some tweaks to annotations
- Fix span for GRHS
- Move TrailingAnns from last match to FunBind
- Fix GADT 'where' clause span
- Capture full range for a CaseAlt Match
- - - - -
d5a8780d by Simon Hengel at 2023-10-23T09:10:23-04:00
Update primitives.rst
- - - - -
4d075924 by Josh Meredith at 2023-10-24T23:04:12+11:00
JS/userguide: add explanation of writing jsbits
- - - - -
07ab5cc1 by Cheng Shao at 2023-10-24T15:40:32-04:00
testsuite: increase timeout of ghc-api tests for wasm32
ghc-api tests for wasm32 are more likely to timeout due to the large
wasm module sizes, especially when testing with wasm native tail
calls, given wasmtime's handling of tail call opcodes are suboptimal
at the moment. It makes sense to increase timeout specifically for
these tests on wasm32. This doesn't affect other targets, and for
wasm32 we don't increase timeout for all tests, so not to risk letting
major performance regressions slip through the testsuite.
- - - - -
0d6acca5 by Greg Steuck at 2023-10-26T08:44:23-04:00
Explicitly require RLIMIT_AS before use in OSMem.c
This is done elsewhere in the source tree. It also suddenly is
required on OpenBSD.
- - - - -
9408b086 by Sylvain Henry at 2023-10-26T08:45:03-04:00
Modularity: modularize external linker
Decouple runLink from DynFlags to allow calling runLink more easily.
This is preliminary work for calling Emscripten's linker (emcc) from
our JavaScript linker.
- - - - -
e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00
js: add JStg IR, remove unsaturated constructor
- Major step towards #22736 and adding the optimizer in #22261
- - - - -
35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00
Fix a bug in tail calls with ticks
See #24078 for the diagnosis. The change affects only
the Tick case of occurrence analysis.
It's a bit hard to test, so no regression test (yet anyway).
- - - - -
9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00
Teach tag-inference about SeqOp/seq#
Fixes the STG/tag-inference analogue of #15226.
Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00
[PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra
48e391952c17ff7eab10b0b1456e3f2a2af28a9b
introduced `SYM_TYPE_DUP_DISCARD` to the bitfield.
The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value.
Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us
relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions.
- - - - -
5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00
Fix and test for issue #24111, TH.Ppr output of pattern synonyms
- - - - -
723bc352 by Alan Zimmerman at 2023-10-30T20:36:41-04:00
EPA: print doc comments as normal comments
And ignore the ones allocated in haddock processing.
It does not guarantee that every original haddock-like comment appears
in the output, as it discards ones that have no legal attachment point.
closes #23459
- - - - -
21b76843 by Simon Peyton Jones at 2023-10-30T20:37:17-04:00
Fix non-termination bug in equality solver
constraint left-to-right then right to left, forever.
Easily fixed.
- - - - -
270867ac by Sebastian Graf at 2023-10-30T20:37:52-04:00
ghc-toolchain: build with `-package-env=-` (#24131)
Otherwise globally installed libraries (via `cabal install --lib`)
break the build.
Fixes #24131.
- - - - -
7a90020f by Krzysztof Gogolewski at 2023-10-31T20:03:37-04:00
docs: fix ScopedTypeVariables example (#24101)
The previous example didn't compile.
Furthermore, it wasn't demonstrating the point properly.
I have changed it to an example which shows that 'a' in the signature
must be the same 'a' as in the instance head.
- - - - -
49f69f50 by Krzysztof Gogolewski at 2023-10-31T20:04:13-04:00
Fix pretty-printing of type family dependencies
"where" should be after the injectivity annotation.
- - - - -
73c191c0 by Ben Gamari at 2023-10-31T20:04:49-04:00
gitlab-ci: Bump LLVM bootstrap jobs to Debian 12
As the Debian 10 images have too old an LLVM.
Addresses #24056.
- - - - -
5b0392e0 by Matthew Pickering at 2023-10-31T20:04:49-04:00
ci: Run aarch64 llvm backend job with "LLVM backend" label
This brings it into line with the x86 LLVM backend job.
- - - - -
9f9c9227 by Ryan Scott at 2023-11-01T09:19:12-04:00
More robust checking for DataKinds
As observed in #22141, GHC was not doing its due diligence in catching code
that should require `DataKinds` in order to use. Most notably, it was allowing
the use of arbitrary data types in kind contexts without `DataKinds`, e.g.,
```hs
data Vector :: Nat -> Type -> Type where
```
This patch revamps how GHC tracks `DataKinds`. The full specification is
written out in the `DataKinds` section of the GHC User's Guide, and the
implementation thereof is described in `Note [Checking for DataKinds]` in
`GHC.Tc.Validity`. In brief:
* We catch _type_-level `DataKinds` violations in the renamer. See
`checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in
`GHC.Rename.Pat`.
* We catch _kind_-level `DataKinds` violations in the typechecker, as this
allows us to catch things that appear beneath type synonyms. (We do *not*
want to do this in type-level contexts, as it is perfectly fine for a type
synonym to mention something that requires DataKinds while still using the
type synonym in a module that doesn't enable DataKinds.) See `checkValidType`
in `GHC.Tc.Validity`.
* There is now a single `TcRnDataKindsError` that classifies all manner of
`DataKinds` violations, both in the renamer and the typechecker. The
`NoDataKindsDC` error has been removed, as it has been subsumed by
`TcRnDataKindsError`.
* I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit
uses of data types at the kind level without `DataKinds`. Previously,
`isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is
inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`.
Moreover, it thwarted the implementation of the `DataKinds` check in
`checkValidType`, since we would expand `Constraint` (which was OK without
`DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and
reject it. Now both are allowed.
* I have added a flurry of additional test cases that test various corners of
`DataKinds` checking.
Fixes #22141.
- - - - -
575d7690 by Sylvain Henry at 2023-11-01T09:19:53-04:00
JS: fix FFI "wrapper" and "dynamic"
Fix codegen and helper functions for "wrapper" and "dynamic" foreign
imports.
Fix tests:
- ffi006
- ffi011
- T2469
- T4038
Related to #22363
- - - - -
81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00
EPA: Use full range for Anchor
This change requires a series of related changes, which must all land
at the same time, otherwise all the EPA tests break.
* Use the current Anchor end as prior end
Use the original anchor location end as the source of truth for
calculating print deltas.
This allows original spacing to apply in most cases, only changed
AST items need initial delta positions.
* Add DArrow to TrailingAnn
* EPA Introduce HasTrailing in ExactPrint
Use [TrailingAnn] in enterAnn and remove it from
ExactPrint (LocatedN RdrName)
* In HsDo, put TrailingAnns at top of LastStmt
* EPA: do not convert comments to deltas when balancing.
* EPA: deal with fallout from getMonoBind
* EPA fix captureLineSpacing
* EPA print any comments in the span before exiting it
* EPA: Add comments to AnchorOperation
* EPA: remove AnnEofComment, it is no longer used
Updates Haddock submodule
- - - - -
03e82511 by Rodrigo Mesquita at 2023-11-01T22:24:32-04:00
Fix in docs regarding SSymbol, SNat, SChar (#24119)
- - - - -
362cc693 by Matthew Pickering at 2023-11-01T22:25:08-04:00
hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1)
Updating the bootstrap plans with more recent GHC versions.
- - - - -
00b9b8d3 by Matthew Pickering at 2023-11-01T22:25:08-04:00
ci: Add 9.8.1 bootstrap testing job
- - - - -
ef3d20f8 by Matthew Pickering at 2023-11-01T22:25:08-04:00
Compatibility with 9.8.1 as boot compiler
This fixes several compatability issues when using 9.8.1 as the boot
compiler.
* An incorrect version guard on the stack decoding logic in ghc-heap
* Some ghc-prim bounds need relaxing
* ghc is no longer wired in, so we have to remove the -this-unit-id ghc
call.
Fixes #24077
- - - - -
6755d833 by Jaro Reinders at 2023-11-03T10:54:42+01:00
Add NCG support for common 64bit operations to the x86 backend.
These used to be implemented via C calls which was obviously quite bad
for performance for operations like simple addition.
Co-authored-by: Andreas Klebinger
- - - - -
0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00
T2T in Expressions (#23738)
This patch implements the T2T (term-to-type) transformation in
expressions. Given a function with a required type argument
vfun :: forall a -> ...
the user can now call it as
vfun (Maybe Int)
instead of
vfun (type (Maybe Int))
The Maybe Int argument is parsed and renamed as a term (HsExpr), but then
undergoes a conversion to a type (HsType).
See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs
and Note [RequiredTypeArguments and the T2T mapping]
Left as future work: checking for puns.
- - - - -
cc1c7c54 by Duncan Coutts at 2023-11-05T00:23:44-04:00
Add a test for I/O managers
It tries to cover the cases of multiple threads waiting on the same
fd for reading and multiple threads waiting for writing, including
wait cancellation by async exceptions.
It should work for any I/O manager, in-RTS or in-Haskell.
Unfortunately it will not currently work for Windows because it relies
on anonymous unix sockets. It could in principle be ported to use
Windows named pipes.
- - - - -
2e448f98 by Cheng Shao at 2023-11-05T00:23:44-04:00
Skip the IOManager test on wasm32 arch.
The test relies on the sockets API which are not (yet) available.
- - - - -
fe50eb35 by Cheng Shao at 2023-11-05T00:24:20-04:00
compiler: fix eager blackhole symbol in wasm32 NCG
- - - - -
af771148 by Cheng Shao at 2023-11-05T00:24:20-04:00
testsuite: fix optasm tests for wasm32
- - - - -
1b90735c by Matthew Pickering at 2023-11-05T00:24:20-04:00
testsuite: Add wasm32 to testsuite arches with NCG
The compiler --info reports that wasm32 compilers have a NCG, so we
should agree with that here.
- - - - -
db9a6496 by Alan Zimmerman at 2023-11-05T00:24:55-04:00
EPA: make locA a function, not a field name
And use it to generalise reLoc
The following for the windows pipeline one. 5.5%
Metric Increase:
T5205
- - - - -
833e250c by Simon Peyton Jones at 2023-11-05T00:25:31-04:00
Update the unification count in wrapUnifierX
Omitting this caused type inference to fail in #24146.
This was an accidental omision in my refactoring of the
equality solver.
- - - - -
e451139f by Andreas Klebinger at 2023-11-05T00:26:07-04:00
Remove an accidental git conflict marker from a comment.
- - - - -
96bf62ff by Matthew Pickering at 2023-11-06T17:48:23+00:00
hadrian: Build all executables in bin/ folder
In the end the bindist creation logic copies them all into the bin
folder. There is no benefit to building a specific few binaries in the
lib/bin folder anymore.
This also removes the ad-hoc logic to copy the touchy and unlit
executables from stage0 into stage1. It takes <1s to build so we might
as well just build it.
- - - - -
dc151c42 by Matthew Pickering at 2023-11-06T17:48:23+00:00
fail when bindist configure fails
- - - - -
a4fee079 by Matthew Pickering at 2023-11-06T17:48:24+00:00
Correctly propagate build/host/target to bindist
fix host/target bindist
t
- - - - -
67fc2f9d by Matthew Pickering at 2023-11-06T17:48:24+00:00
ci: Test cross bindists
- - - - -
761c3a9e by Matthew Pickering at 2023-11-06T17:48:24+00:00
CROSS_STAGE variable
- - - - -
97c37ca0 by Matthew Pickering at 2023-11-06T17:48:24+00:00
Use explicit syntax rather than pure
- - - - -
1cd717c2 by Matthew Pickering at 2023-11-06T17:48:24+00:00
ci: Javascript don't set CROSS_EMULATOR
There is no CROSS_EMULATOR needed to run javascript binaries, so we
don't set the CROSS_EMULATOR to some dummy value.
- - - - -
02e7d44c by Matthew Pickering at 2023-11-06T17:48:24+00:00
hadrian: Fill in more of the default.host toolchain file
When you are building a cross compiler this file will be used to build
stage1 and it's libraries, so we need enough information here to work
accurately. There is still more work to be done (see for example, word
size is still fixed).
- - - - -
3dc2f86d by Matthew Pickering at 2023-11-06T17:48:58+00:00
hadrian: Build stage 2 cross compilers
* Most of hadrian is abstracted over the stage in order to remove the
assumption that the target of all stages is the same platform. This
allows the RTS to be built for two different targets for example.
* Abstracts the bindist creation logic to allow building either normal
or cross bindists. Normal bindists use stage 1 libraries and a stage 2
compiler. Cross bindists use stage 2 libararies and a stage 2
compiler.
-------------------------
Metric Decrease:
T10421a
T10858
T11195
T11276
T11374
T11822
T15630
T17096
T18478
T20261
Metric Increase:
parsing001
-------------------------
- - - - -
8fd42b63 by GHC GitLab CI at 2023-11-06T17:49:00+00:00
fix
- - - - -
3521ff6d by GHC GitLab CI at 2023-11-06T17:49:00+00:00
Build genapply per stage
- - - - -
ed1dce40 by GHC GitLab CI at 2023-11-06T17:49:00+00:00
Correct GHC_PKG path
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Driver/Config/Linker.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/DocString.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Syntax.hs
- + compiler/GHC/JS/Ident.hs
- + compiler/GHC/JS/JStg/Monad.hs
- compiler/GHC/JS/Unsat/Syntax.hs → compiler/GHC/JS/JStg/Syntax.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/JS/Ppr.hs
- compiler/GHC/JS/Syntax.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/af3cf674fced3a22856b39ad6fba3a178ebf5d89...ed1dce4037da401dd2af06d8f70e2444f622b825
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/af3cf674fced3a22856b39ad6fba3a178ebf5d89...ed1dce4037da401dd2af06d8f70e2444f622b825
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/20231106/ab0d9b3a/attachment-0001.html>
More information about the ghc-commits
mailing list