[Git][ghc/ghc][wip/int-index/errmsg-type-abstractions] 7 commits: wasm: add Note [Variable passing in JSFFI] as !13583 follow up
Vladislav Zavialov (@int-index)
gitlab at gitlab.haskell.org
Wed Feb 26 00:15:15 UTC 2025
Vladislav Zavialov pushed to branch wip/int-index/errmsg-type-abstractions at Glasgow Haskell Compiler / GHC
Commits:
f3bfe31e by Cheng Shao at 2025-02-23T14:06:25-05:00
wasm: add Note [Variable passing in JSFFI] as !13583 follow up
This patch adds a note to explain how the magic variables like
`__ghc_wasm_jsffi_dyld` are brought into scope of JSFFI code snippets,
as follow up work of !13583.
- - - - -
c318be56 by Cheng Shao at 2025-02-23T14:07:02-05:00
libffi: update to 3.4.7
Bumps libffi submodule.
- - - - -
33aca30f by sheaf at 2025-02-25T08:58:46-05:00
LLVM: account for register type in funPrologue
We were not properly accounting for the live register type of
global registers in GHC.CmmToLlvm.CodeGen.funPrologue. This meant that
we could allocated a register at type <4 x i32> but try to write to it
at type <8 x i16>, which LLVM doesn't much like.
This patch fixes that by inserting intermerdiate casts when necessary.
Fixes #25730
- - - - -
0eb58b0e by sheaf at 2025-02-25T08:59:29-05:00
base: make Data.List.NonEmpty.unzip match Data.List
This commit makes Data.List.NonEmpty.unzip match the implementation
of Data.List, as was suggested in approved CLC proposal #107.
- - - - -
f4da90f1 by Matthew Pickering at 2025-02-25T14:11:21-05:00
interpreter: Fix underflow frame lookups
BCOs can be nested, resulting in nested BCO stack frames where the inner most
stack frame can refer to variables stored on earlier stack frames via the
PUSH_L instruction.
|---------|
| BCO_1 | -<-┐
|---------|
......... |
|---------| | PUSH_L <n>
| BCO_N | ->-┘
|---------|
Here BCO_N is syntactically nested within the code for BCO_1 and will result
in code that references the prior stack frame of BCO_1 for some of it's local
variables. If a stack overflow happens between the creation of the stack frame
for BCO_1 and BCO_N the RTS might move BCO_N to a new stack chunk while leaving
BCO_1 in place, invalidating a simple offset based reference to the outer stack
frames.
Therefore `ReadSpW` first performs a bounds check to ensure that accesses onto
the stack will succeed. If the target address would not be a valid location for
the current stack chunk then `slow_spw` function is called, which dereferences
the underflow frame to adjust the offset before performing the lookup.
┌->--x | CHK_1 |
| CHK_2 | | | |---------|
|---------| | └-> | BCO_1 |
| UD_FLOW | -- x |---------|
|---------| |
| ...... | |
|---------| | PUSH_L <n>
| BCO_ N | ->-┘
|---------|
Fixes #25750
- - - - -
c3f2d284 by Vladislav Zavialov at 2025-02-25T14:11:58-05:00
Remove ArgPatBuilder
ArgPatBuilder in Parser/PostProcess.hs became redundant with the
introduction of InvisPat (36a75b80eb).
This small refactoring removes it.
- - - - -
18f9d124 by Vladislav Zavialov at 2025-02-26T00:15:00+00:00
Tidy up error messages for TypeAbstractions
1. Print the '@' symbol before invisible patterns and improve phrasing:
T24557c.hs:8:4: error: [GHC-11983]
- Invisible type pattern pat is not allowed here
+ Illegal invisible type pattern: @pat
+ An invisible type pattern must occur in an argument position.
2. Use a single error code for all type abstractions deemed illegal
due to the TypeAbstractions extension being disabled.
Before this change:
* [GHC-78249] was used in function equations, lambdas
* [GHC-17916] was used in constructor patterns
After this change:
* [GHC-78249] is used to report all illegal type abstractions
* [GHC-17916] is no longer used
There was no reason for both error codes to exist and this distinction
was a source of complexity in GHC/Tc/Errors/* and GHC/Rename/Pat.hs
3. Group the different "invisible type pattern" error constructors
under a single parent constructor, TcRnIllegalInvisibleTypePattern
containing BadInvisPatReason
- - - - -
36 changed files:
- compiler/GHC/Cmm/Reg.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Llvm/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Types/Error/Codes.hs
- libffi-tarballs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/ghci/GHCi/ObjLink.hs
- rts/Interpreter.c
- + testsuite/tests/llvm/should_run/T25730.hs
- + testsuite/tests/llvm/should_run/T25730.stdout
- + testsuite/tests/llvm/should_run/T25730C.c
- testsuite/tests/llvm/should_run/all.T
- testsuite/tests/rename/should_fail/T17594b.hs
- testsuite/tests/rename/should_fail/T17594b.stderr
- + testsuite/tests/rename/should_fail/T17594b_th.hs
- + testsuite/tests/rename/should_fail/T17594b_th.stderr
- testsuite/tests/rename/should_fail/T22478e.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/th/T24557a.stderr
- testsuite/tests/th/T24557b.stderr
- testsuite/tests/th/T24557c.stderr
- testsuite/tests/th/T24557d.stderr
- testsuite/tests/typecheck/should_fail/T17594c.stderr
- testsuite/tests/typecheck/should_fail/T17594d.stderr
- testsuite/tests/typecheck/should_fail/T17594g.stderr
- testsuite/tests/typecheck/should_fail/T19109.stderr
- testsuite/tests/typecheck/should_fail/T23776.stderr
- utils/jsffi/dyld.mjs
- utils/jsffi/post-link.mjs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1bd03e1250bc0996208a5445dc4cae20ae33e746...18f9d124939d699bbf637e2eba9bfbd71ec89799
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1bd03e1250bc0996208a5445dc4cae20ae33e746...18f9d124939d699bbf637e2eba9bfbd71ec89799
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/20250225/957cd9eb/attachment.html>
More information about the ghc-commits
mailing list