[Git][ghc/ghc][wip/az/epa-hslet-tokens] 60 commits: ci: bump ci-images for updated wasm image
Alan Zimmerman (@alanz)
gitlab at gitlab.haskell.org
Thu Feb 1 23:40:52 UTC 2024
Alan Zimmerman pushed to branch wip/az/epa-hslet-tokens at Glasgow Haskell Compiler / GHC
Commits:
320454d3 by Cheng Shao at 2024-01-17T23:02:40+00:00
ci: bump ci-images for updated wasm image
- - - - -
2eca52b4 by Cheng Shao at 2024-01-17T23:06:44+00:00
base: treat all FDs as "nonblocking" on wasm
On posix platforms, when performing read/write on FDs, we check the
nonblocking flag first. For FDs without this flag (e.g. stdout), we
call fdReady() first, which in turn calls poll() to wait for I/O to be
available on that FD. This is problematic for wasm32-wasi: although
select()/poll() is supported via the poll_oneoff() wasi syscall, that
syscall is rather heavyweight and runtime behavior differs in
different wasi implementations. The issue is even worse when targeting
browsers, given there's no satisfactory way to implement async I/O as
a synchronous syscall, so existing JS polyfills for wasi often give up
and simply return ENOSYS.
Before we have a proper I/O manager that avoids poll_oneoff() for
async I/O on wasm, this patch improves the status quo a lot by merely
pretending all FDs are "nonblocking". Read/write on FDs will directly
invoke read()/write(), which are much more reliably handled in
existing wasi implementations, especially those in browsers.
Fixes #23275 and the following test cases: T7773 isEOF001 openFile009
T4808 cgrun025
Approved by CLC proposal #234:
https://github.com/haskell/core-libraries-committee/issues/234
- - - - -
83c6c710 by Andrew Lelechenko at 2024-01-18T05:21:49-05:00
base: clarify how to disable warnings about partiality of Data.List.{head,tail}
- - - - -
c4078f2f by Simon Peyton Jones at 2024-01-18T05:22:25-05:00
Fix four bug in handling of (forall cv. body_ty)
These bugs are all described in #24335
It's not easy to provoke the bug, hence no test case.
- - - - -
119586ea by Alexis King at 2024-01-19T00:08:00-05:00
Always refresh profiling CCSes after running pending initializers
Fixes #24171.
- - - - -
9718d970 by Oleg Grenrus at 2024-01-19T00:08:36-05:00
Set default-language: GHC2021 in ghc library
Go through compiler/ sources, and remove
all BangPatterns (and other GHC2021 enabled extensions in these files).
- - - - -
3ef71669 by Matthew Pickering at 2024-01-19T21:55:16-05:00
testsuite: Remove unused have_library function
Also remove the hence unused testsuite option `--test-package-db`.
Fixes #24342
- - - - -
5b7fa20c by Jade at 2024-01-19T21:55:53-05:00
Fix Spelling in the compiler
Tracking: #16591
- - - - -
09875f48 by Matthew Pickering at 2024-01-20T12:20:44-05:00
testsuite: Implement `isInTreeCompiler` in a more robust way
Just a small refactoring to avoid redundantly specifying the same
strings in two different places.
- - - - -
0d12b987 by Jade at 2024-01-20T12:21:20-05:00
Change maintainer email from cvs-ghc at haskell.org to ghc-devs at haskell.org. Fixes #22142
- - - - -
1fa1c00c by Jade at 2024-01-23T19:17:03-05:00
Enhance Documentation of functions exported by Data.Function
This patch aims to improve the documentation of functions exported
in Data.Function
Tracking: #17929
Fixes: #10065
- - - - -
ab47a43d by Jade at 2024-01-23T19:17:39-05:00
Improve documentation of hGetLine.
- Add explanation for whether a newline is returned
- Add examples
Fixes #14804
- - - - -
dd4af0e5 by Cheng Shao at 2024-01-23T19:18:17-05:00
Fix genapply for cross-compilation by nuking fragile CPP logic
This commit fixes incorrectly built genapply when cross compiling
(#24347) by nuking all fragile CPP logic in it from the orbit. All
target-specific info are now read from DerivedConstants.h at runtime,
see added note for details. Also removes a legacy Makefile and adds
haskell language server support for genapply.
- - - - -
0cda2b8b by Cheng Shao at 2024-01-23T19:18:17-05:00
rts: enable wasm32 register mapping
The wasm backend didn't properly make use of all Cmm global registers
due to #24347. Now that it is fixed, this patch re-enables full
register mapping for wasm32, and we can now generate smaller & faster
wasm modules that doesn't always spill arguments onto the stack. Fixes #22460 #24152.
- - - - -
0325a6e5 by Greg Steuck at 2024-01-24T01:29:44-05:00
Avoid utf8 in primops.txt.pp comments
They don't make it through readFile' without explicitly setting the
encoding. See https://gitlab.haskell.org/ghc/ghc/-/issues/17755
- - - - -
1aaf0bd8 by David Binder at 2024-01-24T01:30:20-05:00
Bump hpc and hpc-bin submodule
Bump hpc to 0.7.0.1
Bump hpc-bin to commit d1780eb2
- - - - -
e693a4e8 by Ben Gamari at 2024-01-24T01:30:56-05:00
testsuite: Ignore stderr in T8089
Otherwise spurious "Killed: 9" messages to stderr may cause the test to fail.
Fixes #24361.
- - - - -
a40f4ab2 by sheaf at 2024-01-24T14:04:33-05:00
Fix FMA instruction on LLVM
We were emitting the wrong instructions for fused multiply-add
operations on LLVM:
- the instruction name is "llvm.fma.f32" or "llvm.fma.f64", not "fmadd"
- LLVM does not support other instructions such as "fmsub"; instead
we implement these by flipping signs of some arguments
- the instruction is an LLVM intrinsic, which requires handling it
like a normal function call instead of a machine instruction
Fixes #24223
- - - - -
69abc786 by Andrei Borzenkov at 2024-01-24T14:05:09-05:00
Add changelog entry for renaming tuples from (,,...,,) to Tuple<n> (24291)
- - - - -
0ac8f385 by Cheng Shao at 2024-01-25T00:27:48-05:00
compiler: remove unused GHC.Linker module
The GHC.Linker module is empty and unused, other than as a hack for
the make build system. We can remove it now that make is long gone;
the note is moved to GHC.Linker.Loader instead.
- - - - -
699da01b by Hécate Moonlight at 2024-01-25T00:28:27-05:00
Clarification for newtype constructors when using `coerce`
- - - - -
b2d8cd85 by Matt Walker at 2024-01-26T09:50:08-05:00
Fix #24308
Add tests for semicolon separated where clauses
- - - - -
0da490a1 by Ben Gamari at 2024-01-26T17:34:41-05:00
hsc2hs: Bump submodule
- - - - -
3f442fd2 by Ben Gamari at 2024-01-26T17:34:41-05:00
Bump containers submodule to 0.7
- - - - -
82a1c656 by Sebastian Nagel at 2024-01-29T02:32:40-05:00
base: with{Binary}File{Blocking} only annotates own exceptions
Fixes #20886
This ensures that inner, unrelated exceptions are not misleadingly
annotated with the opened file.
- - - - -
9294a086 by Andreas Klebinger at 2024-01-29T02:33:15-05:00
Fix fma warning when using llvm on aarch64.
On aarch64 fma is always on so the +fma flag doesn't exist for that
target. Hence no need to try and pass +fma to llvm.
Fixes #24379
- - - - -
ced2e731 by sheaf at 2024-01-29T17:27:12-05:00
No shadowing warnings for NoFieldSelector fields
This commit ensures we don't emit shadowing warnings when a user
shadows a field defined with NoFieldSelectors.
Fixes #24381
- - - - -
8eeadfad by Patrick at 2024-01-29T17:27:51-05:00
Fix bug wrong span of nested_doc_comment #24378
close #24378
1. Update the start position of span in `nested_doc_comment` correctly.
and hence the spans of identifiers of haddoc can be computed correctly.
2. add test `HaddockSpanIssueT24378`.
- - - - -
a557580f by Alexey Radkov at 2024-01-30T19:41:52-05:00
Fix irrelevant dodgy-foreign-imports warning on import f-pointers by value
A test *сс018* is attached (not sure about the naming convention though).
Note that without the fix, the test fails with the *dodgy-foreign-imports*
warning passed to stderr. The warning disappears after the fix.
GHC shouldn't warn on imports of natural function pointers from C by value
(which is feasible with CApiFFI), such as
```haskell
foreign import capi "cc018.h value f" f :: FunPtr (Int -> IO ())
```
where
```c
void (*f)(int);
```
See a related real-world use-case
[here](https://gitlab.com/daniel-casanueva/pcre-light/-/merge_requests/17).
There, GHC warns on import of C function pointer `pcre_free`.
- - - - -
ca99efaf by Alexey Radkov at 2024-01-30T19:41:53-05:00
Rename test cc018 -> T24034
- - - - -
88c38dd5 by Ben Gamari at 2024-01-30T19:42:28-05:00
rts/TraverseHeap.c: Ensure that PosixSource.h is included first
- - - - -
ca2e919e by Simon Peyton Jones at 2024-01-31T09:29:45+00:00
Make decomposeRuleLhs a bit more clever
This fixes #24370 by making decomposeRuleLhs undertand
dictionary /functions/ as well as plain /dictionaries/
- - - - -
94ce031d by Teo Camarasu at 2024-02-01T05:49:49-05:00
doc: Add -Dn flag to user guide
Resolves #24394
- - - - -
31553b11 by Ben Gamari at 2024-02-01T12:21:29-05:00
cmm: Introduce MO_RelaxedRead
In hand-written Cmm it can sometimes be necessary to atomically load
from memory deep within an expression (e.g. see the `CHECK_GC` macro).
This MachOp provides a convenient way to do so without breaking the
expression into multiple statements.
- - - - -
0785cf81 by Ben Gamari at 2024-02-01T12:21:29-05:00
codeGen: Use relaxed accesses in ticky bumping
- - - - -
be423dda by Ben Gamari at 2024-02-01T12:21:29-05:00
base: use atomic write when updating timer manager
- - - - -
8a310e35 by Ben Gamari at 2024-02-01T12:21:29-05:00
Use relaxed atomics to manipulate TSO status fields
- - - - -
d6809ee4 by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Add necessary barriers when manipulating TSO owner
- - - - -
39e3ac5d by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Use `switch` to branch on why_blocked
This is a semantics-preserving refactoring.
- - - - -
515eb33d by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Fix synchronization on thread blocking state
We now use a release barrier whenever we update a thread's blocking
state. This required widening StgTSO.why_blocked as AArch64 does not
support atomic writes on 16-bit values.
- - - - -
eb38812e by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Fix data race in threadPaused
This only affects an assertion in the debug RTS and only needs relaxed
ordering.
- - - - -
26c48dd6 by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Fix data race in threadStatus#
- - - - -
6af43ab4 by Ben Gamari at 2024-02-01T12:21:29-05:00
rts: Fix data race in Interpreter's preemption check
- - - - -
9502ad3c by Ben Gamari at 2024-02-01T12:21:29-05:00
rts/Messages: Fix data race
- - - - -
60802db5 by Ben Gamari at 2024-02-01T12:21:30-05:00
rts/Prof: Fix data race
- - - - -
ef8ccef5 by Ben Gamari at 2024-02-01T12:21:30-05:00
rts: Use relaxed ordering on dirty/clean info tables updates
When changing the dirty/clean state of a mutable object we needn't have
any particular ordering.
- - - - -
76fe2b75 by Ben Gamari at 2024-02-01T12:21:30-05:00
codeGen: Use relaxed-read in closureInfoPtr
- - - - -
a6316eb4 by Ben Gamari at 2024-02-01T12:21:30-05:00
STM: Use acquire loads when possible
Full sequential consistency is not needed here.
- - - - -
6bddfd3d by Ben Gamari at 2024-02-01T12:21:30-05:00
rts: Use fence rather than redundant load
Previously we would use an atomic load to ensure acquire ordering.
However, we now have `ACQUIRE_FENCE_ON`, which allows us to express this
more directly.
- - - - -
55c65dbc by Ben Gamari at 2024-02-01T12:21:30-05:00
rts: Fix data races in profiling timer
- - - - -
856b5e75 by Ben Gamari at 2024-02-01T12:21:30-05:00
Add Note [C11 memory model]
- - - - -
6534da24 by Cheng Shao at 2024-02-01T12:22:07-05:00
compiler: move generic cmm optimization logic in NCG to a standalone module
This commit moves GHC.CmmToAsm.cmmToCmm to a standalone module,
GHC.Cmm.GenericOpt. The main motivation is enabling this logic to be
run in the wasm backend NCG code, which is defined in other modules
that's imported by GHC.CmmToAsm, causing a cyclic dependency issue.
- - - - -
87e34888 by Cheng Shao at 2024-02-01T12:22:07-05:00
compiler: explicitly disable PIC in wasm32 NCG
This commit explicitly disables the ncgPIC flag for the wasm32 target.
The wasm backend doesn't support PIC for the time being.
- - - - -
c6ce242e by Cheng Shao at 2024-02-01T12:22:07-05:00
compiler: enable generic cmm optimizations in wasm backend NCG
This commit enables the generic cmm optimizations in other NCGs to be
run in the wasm backend as well, followed by a late cmm control-flow
optimization pass. The added optimizations do catch some corner cases
not handled by the pre-NCG cmm pipeline and are useful in generating
smaller CFGs.
- - - - -
151dda4e by Andrei Borzenkov at 2024-02-01T12:22:43-05:00
Namespacing for WARNING/DEPRECATED pragmas (#24396)
New syntax for WARNING and DEPRECATED pragmas was added,
namely namespace specifierss:
namespace_spec ::= 'type' | 'data' | {- empty -}
warning ::= warning_category namespace_spec namelist strings
deprecation ::= namespace_spec namelist strings
A new data type was introduced to represent these namespace specifiers:
data NamespaceSpecifier =
NoSpecifier |
TypeNamespaceSpecifier (EpToken "type") |
DataNamespaceSpecifier (EpToken "data")
Extension field XWarning now contains this NamespaceSpecifier.
lookupBindGroupOcc function was changed: it now takes NamespaceSpecifier
and checks that the namespace of the found names matches the passed flag.
With this change {-# WARNING data D "..." #-} pragma will only affect value
namespace and {-# WARNING type D "..." #-} will only affect type
namespace. The same logic is applicable to DEPRECATED pragmas.
Finding duplicated warnings inside rnSrcWarnDecls now takes into
consideration NamespaceSpecifier flag to allow warnings with the
same names that refer to different namespaces.
- - - - -
38c3afb6 by Bryan Richter at 2024-02-01T12:23:19-05:00
CI: Disable the test-cabal-reinstall job
Fixes #24363
- - - - -
38250281 by Alan Zimmerman at 2024-02-01T20:50:00+00:00
EPA: Move EpAnn out of extension points
Leaving a few that are too tricky, maybe some other time.
Updates haddock submodule
- - - - -
f50d74eb by Alan Zimmerman at 2024-02-01T20:50:02+00:00
EPA: Remove some unneeded helpers from Parser.y
info: patch template saved to `-`
- - - - -
0d16fa7f by Alan Zimmerman at 2024-02-01T21:21:06+00:00
EPA: Tackling extra parser allocations stats fail
- make all getCommentsFor results strict.
- adding `seq` to various Parser.y helper functions
This metric increases 2.6% (6% before the mitigations in this commit)
I think the balance are inherent to the change in GhcPs structure, it
is a pathological case with HsAppTy repeating thousands of times.
Metric Increase:
parsing001
- - - - -
8f594889 by Vladislav Zavialov at 2024-02-01T21:52:49+00:00
EPA: Use NoExtField in XApp
Metric Decrease:
parsing001
- - - - -
30 changed files:
- .gitlab-ci.yml
- compiler/GHC.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/CommonBlockElim.hs
- compiler/GHC/Cmm/ContFlowOpt.hs
- compiler/GHC/Cmm/Dataflow.hs
- compiler/GHC/Cmm/Dataflow/Graph.hs
- compiler/GHC/Cmm/Expr.hs
- + compiler/GHC/Cmm/GenericOpt.hs
- compiler/GHC/Cmm/Graph.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Liveness.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/CFG/Dominators.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/Wasm.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2a32b624552a1a5c034bb5c0c5db716f8de708ed...8f594889ce38e4deb5154e363838280a19667dc0
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2a32b624552a1a5c034bb5c0c5db716f8de708ed...8f594889ce38e4deb5154e363838280a19667dc0
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/20240201/7ef5112a/attachment-0001.html>
More information about the ghc-commits
mailing list