[Git][ghc/ghc][ghc-9.12] 75 commits: EPA: Remove [AddEpAnn] from IE, Pat and some Tys
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Wed Nov 13 01:32:00 UTC 2024
Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC
Commits:
128d1b18 by Alan Zimmerman at 2024-10-30T16:52:57+05:30
EPA: Remove [AddEpAnn] from IE, Pat and some Tys
EPA: Remove [AddEpAnn] from LazyPat
EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat
EPA: Remove [AddEpAnn] from HsFieldBind
EPA: Remove [AddEpAnn] from PatSynBind
EPA: Remove [AddEpAnn] from IPBind
EPA: Remove [AddEpAnn] from FixSig
EPA: Remove [AddEpAnn] from activation rules
EPA: Remove [AddEpann] from SpecInstSig
EPA: Remove [AddEpAnn] from MinimalSig
EPA: Remove [AddEpAnn] from SCCFunSig
EPA: Remove [AddEpAnn] from CompleteMatchSig
EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig
EPA: Remove [AddEpAnn] from IEThingAbs
EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith
EPA: Remove [AddEpAnn] from IEModuleContents
EPA: Remove [AddEpAnn] from HsOpTy
EPA: Remove [AddEpAnn] for various binders
EPA: Remove [AddEpAnn] for HsIParamTy
(cherry picked from commit e9cc469954eb19c5c131f9cfc1f0ede6ea9e9848)
- - - - -
bc19b10c by Alan Zimmerman at 2024-10-30T16:53:14+05:30
EPA: Remove [AddEpAnn] commit 3
EPA: Remove [AddEpAnn] from HsDocTy
EPA: Remove [AddEpAnn] from HsBangTy
EPA: Remove [AddEpAnn] from HsExplicitListTy
EPA: Remove [AddEpAnn] from HsExplicitTupleTy
EPA: Remove [AddEpAnn] from HsTypedBracket
EPA: Remove [AddEpAnn] from HsUntypedBracket
EPA: Remove [AddEpAnn] from PatBuilderOpApp
EPA: break out 'EpToken "|"' from ClassDecl anns
EPA: Remove [AddEpAnn] from ClassDecl
EPA: Remove [AddEpAnn] from SynDecl
(cherry picked from commit 5f67db48bdef51905132d990cfaaa0df6532ea99)
- - - - -
96090209 by Cheng Shao at 2024-10-30T16:53:30+05:30
Revert "compiler: start deprecating cmmToRawCmmHook"
This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns
out the GHC-WPC project does use it to observe Cmm in the pipeline,
see #25363.
(cherry picked from commit 525d451e175c7d6acfa968ce99d8d3fc7a8af0c7)
- - - - -
ba012ad5 by Cheng Shao at 2024-10-30T16:53:44+05:30
rts: fix pointer overflow undefined behavior in bytecode interpreter
This patch fixes an unnoticed undefined behavior in the bytecode
interpreter. It can be caught by building `rts/Interpreter.c` with
`-fsanitize=pointer-overflow`, the warning message is something like:
```
rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13
rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13
rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13
```
Whenever we do something like `SpW(-1)`, the negative argument is
implicitly converted to an unsigned integer type and causes pointer
arithmetic overflow. It happens to be harmless for most targets since
overflowing would wrap the result to desired value, but it's still
coincidental and undefined behavior. Furthermore, it causes real
damage to the wasm backend, given clang-20 will emit invalid wasm code
that crashes at run-time for this kind of C code! (see
https://github.com/llvm/llvm-project/issues/108770)
The fix here is adding some explicit casts to ensure we always use the
signed `ptrdiff_t` type as right hand operand of pointer arithmetic.
(cherry picked from commit 5bcfefd5bb73c18a9bad63d1813968832b696f9a)
- - - - -
cb003daf by Alan Zimmerman at 2024-10-30T16:54:21+05:30
EPA: Remove [AddEpAnn] Commit 4
EPA: Remove [AddEpAnn] from DataDecl
This is quite a big change.
The most important part is moving the annotations into HsDataDefn,
using a specific annotation data type.
It has a knock-on to everything that uses HsDataDefn
EPA: Remove [AddEpAnn] for FunDep
EPA: Remove [AddEpann] from FamilyDecl
EPA: Remove [AddEpAnn] From InjectivityAnn
EPA: Remove [AddEpAnn] from DefaultDecl
EPA: Remove [AddEpAnn] from RuleDecls
EPA: Remove [AddEpAnn] from Warnings
(cherry picked from commit 25edf84977fa15b9911ecbdf614789893ad0e108)
- - - - -
ef8096d9 by Daan Rijks at 2024-10-30T16:55:36+05:30
Expand the haddocks for Control.Category
(cherry picked from commit fbbbd010c5537480deaedc812a235311e13ef767)
- - - - -
57c0c460 by Andrew Lelechenko at 2024-10-30T16:55:46+05:30
documentation: more examples for Control.Category
(cherry picked from commit 076c1a104f55750a49de03694786180bd78eb9b6)
- - - - -
30d12c46 by Cheng Shao at 2024-10-30T16:58:18+05:30
ghci: mitigate host/target word size mismatch in BCOByteArray serialization
This patch mitigates a severe host/target word size mismatch issue in
BCOByteArray serialization logic introduced since !12142, see added
note for detailed explanation.
(cherry picked from commit 90891962ad4d2c781e68062de01e25eea999ae1b)
(cherry picked from commit 860596329a85295277aa21854f4aeae2b755c36f)
- - - - -
d256f923 by Cheng Shao at 2024-10-30T16:58:18+05:30
ghci: use plain malloc for mkConInfoTable on non-TNTC platforms
This patch avoids using mmap() to allocate executable memory for
mkConInfoTable on platforms without tables-next-to-code, see added
comment for explanation.
(cherry picked from commit 839ac52e94f8ecf878e522dba0575466af248267)
(cherry picked from commit 9723a703e3fb53383d4afb49d012f9de43c4235b)
- - - - -
50d5feec by Cheng Shao at 2024-10-30T16:58:18+05:30
ghc-internal: add missing CPPs for wasm
This patch adds some missing CPP guards to ghc-internal, given those
functions are non existent on wasm and would cause linking issues.
(cherry picked from commit a998f69d2de062b7290e78221d55e8c49bf95bbc)
(cherry picked from commit f95de54149e66627079d42cfa0b5b70286a3aae7)
- - - - -
647752c8 by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: rename prelude.js to prelude.mjs
This commit renames prelude.js to prelude.mjs for wasm backend rts
jsbits, and slightly adjusts the jsbits contents. This is for
preparing the implementation of dyld.mjs that contains wasm dynamic
linker logic, which needs to import prelude.mjs as a proper ESM
module.
(cherry picked from commit 71a471e7495f1fbf6b44cfbe4e930c99131c583e)
(cherry picked from commit 1d5a2ff899d9c6905a216b24d5c4fc5d54654166)
- - - - -
3218f014 by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: add __wrapped_freeJSVal
This commit wraps imported freeJSVal in a __wrapped_freeJSVal C
function for wasm backend RTS. In general, wasm imports are only
supposed to be directly called by C; they shouldn't be used as
function pointers, which confuses wasm-ld at link-time when generating
shared libraries.
(cherry picked from commit 33d9db17f31f59ef72d6d8dac033a84c45d3c216)
(cherry picked from commit 151017ca9483b77a83f0bde4eb20af490816e62a)
- - - - -
68e780b5 by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: correct stale link in comment
(cherry picked from commit 0d0a16a81b3875c0e21c0bbe9659edc6312c4846)
(cherry picked from commit dfb3988f3b6a96282cbf4e7edf95f15191dc8c36)
- - - - -
6c08d83c by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: drop interpretBCO support from non-dyn ways on wasm
This commit drops interpretBCO support from non dynamic rts ways on
wasm. The bytecode interpreter is only useful when the RTS linker also
works, and on wasm it only works for dynamic ways anyway. An
additional benefit of dropping interpretBCO is reduction in code size
of linked wasm modules, especially since interpretBCO references
ffi_call which is an auto-generated large function in libffi-wasm and
unused by most user applications.
(cherry picked from commit 90a35c41bb676b5e68212f63b187d2c50439714c)
(cherry picked from commit 21dff5baafd20d2a796896c47c243b2c877e2ad4)
- - - - -
319d4a46 by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: don't build predefined GloblRegs for wasm PIC mode
This commit wraps the predefined GlobalRegs in Wasm.S under a CPP
guard to prevent building for PIC mode. When building dynamic ways of
RTS, the wasm globals that represent STG GlobalRegs will be created
and supplied by dyld.mjs. The current wasm dylink convention doesn't
properly support exporting relocatable wasm globals at all, any wasm
global exported by a .so is assumed to be a GOT.mem entry.
(cherry picked from commit 98a32ec551dd95534c1a8eaccb0f67dbe5f19648)
(cherry picked from commit 70f75b0defd8c1c7941581cd333ca198046c3d15)
- - - - -
1fa9b36b by Cheng Shao at 2024-10-30T16:58:18+05:30
rts: fix conflicting StgRun definitions on wasm
This commit fixes conflicting StgRun definition when building dynamic
ways of RTS for wasm in unregisterised mode.
(cherry picked from commit bef94bde53f07a1b0d7eb16d3d0eb1bd62f5f992)
(cherry picked from commit b9b1a3a95588218b8b823f3315adad0fb7c2ed0c)
- - - - -
92eed1ed by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: use targetSupportsRPaths predicate
This commit changes the hostSupportsRPaths predicate to
targetSupportsRPaths and use that to decide whether to pass
RPATH-related link-time options. It's not applied to stage0, we should
just use the default link-time options of stageBoot ghc.
(cherry picked from commit a6a82cdb7162f32a1b73a2a6224d6d9cd208962c)
(cherry picked from commit 7e1f1b0778f581d2b72cfb533c65918b199e6247)
- - - - -
355ac972 by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: disable internal-interpreter of ghc library when cross compiling
This commit disable the internal-interpreter flag of ghc library when
cross compiling, only external interpreter works in such cases.
(cherry picked from commit f232c872c6adf4472b5a1c88812c57aa2aa76cbe)
(cherry picked from commit ce1387a065033fc1b85faa314be52f61a9057778)
- - - - -
af73ef6d by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: enable internal-interpreter for ghc-bin stage0
This commit enables internal-interpreter flag for ghc-bin even when
compiling stage0, as long as target supports ghci. It enables ghci
functionality for cross targets that support ghci, since cross ghc-bin
is really stage0.
(cherry picked from commit 577c1819ab4eb3369cafdaf24114b74da21ce4b4)
(cherry picked from commit 37b3d585e3f0f5c97a2ab375b8ac4ec9c3c17661)
- - - - -
dcd550ab by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: fix CFLAGS for gmp shared objs on wasm
This commit adds -fvisibility=default to CFLAGS of gmp when building
for wasm. This is required to generate the ghc-bignum shared library
without linking errors. Clang defaults to -fvisibility=hidden for wasm
targets, which will cause issues when a symbol is expected to be
exported in a shared library but without explicit visibility attribute
annotation.
(cherry picked from commit c247f2eef9e8450837cbaad1668c6178d094a8fb)
(cherry picked from commit 18e5383329ca4a4bfe3a63f828a4f74f94031550)
- - - - -
3d6f16cb by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: re-enable PIC for gmp on wasm
This commit re-enables --with-pic=yes configuration option of gmp when
building for wasm, given we're about to include support for shared
libraries, TH and ghci.
(cherry picked from commit 775410fdfc5d6faf287eecdaae170af9f8a59bb9)
(cherry picked from commit b537609f4f399538ee9e65df4f3442922693d487)
- - - - -
4f4f378a by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian: add the host_fully_static flavour transformer
This commit adds the host_fully_static flavour transformer to hadrian,
which ensures stage0 is fully statically linked while still permitting
stage1 libdir to contain shared libraries. This is intended to be used
by the wasm backend to build portable linux bindists that contain wasm
shared libraries.
(cherry picked from commit b45080a3e34200767b76faca495f5aea95bb94f5)
(cherry picked from commit c12980bf63c23bb1cbf3e3b3c27a4278a38f97d8)
- - - - -
f69cf2a5 by Cheng Shao at 2024-10-30T16:58:18+05:30
ci: update wasm jobs configuration
This commit bumps ci-image revision to use updated wasm toolchain, and
use host_fully_static instead of fully_static for wasm jobs so to
ensure wasm shared libraries can be properly built.
(cherry picked from commit 5043507ca32e31d14869a0a11dd317529f616fc2)
(cherry picked from commit cbf0b2757b60313f356d701d0857cce44afe8b69)
- - - - -
66c473f2 by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian/testsuite: implement config.cross logic
This commit implements the config.cross field in the testsuite driver.
It comes from the "cross compiling" ghc info field for both
in-tree/out-of-tree GHC, and is an accurate predicate of whether we're
cross-compiling or not (compared to the precense of target emulator),
and is useful to implement predicates to assert the precense of
internal interpreter (only available on non-cross GHC) for tests that
do require it (e.g. plugins).
(cherry picked from commit 2956a3f7ecd58a6fda81447100404941c0ed837d)
(cherry picked from commit 00fef7bcd722c86b5b65d5189d47b9197b0c05a5)
- - - - -
cd124d94 by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs
This patch implements the targetRTSLinkerOnlySupportsSharedLibs
predicate in hadrian. Its definition in hadrian is the single source
of truth, and the information propagates to ghc settings file, ghc
driver and testsuite driver. It is used in various places to ensure
dynamic dependency is selected when the target RTS linker only
supports loading dynamic code.
(cherry picked from commit 8c74a0eda41255ead134f05598f5da70992a7054)
(cherry picked from commit 9d2e02f911f42ffc6934f189b1d30e95ec47cc49)
- - - - -
2daf1ddd by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: don't use host cpu features when testing cross ghc
This patch disables CPU feature detection logic when testing cross
GHC, since those features don't make sense for the target anyway.
(cherry picked from commit b4c3c34090088378870a6705d30665aac6d5c455)
(cherry picked from commit 17386f368a72bba5ed5b3a831e9e9cb744c2f989)
- - - - -
0ab21132 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: implement & use req_plugins predicate
This commit implements req_plugins predicate to indicate that the test
requires plugin functionality. Currently this means cross GHC is
disabled since internal-interpreter doesn't work in cross GHC yet.
(cherry picked from commit 3c21b696abc9acf375307eb91ccc678965487843)
(cherry picked from commit 78600342635c931131ebcabb0fc6584fa44b6bbe)
- - - - -
53187cb7 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: make use of config.interp_force_dyn
This commit takes config.interp_force_dyn into consideration when
setting up TH/ghci way flags.
(cherry picked from commit 93b8af8009a6e174b8d75f766dba2dc4d9aa9119)
(cherry picked from commit 2741e5cf30ae2450b84a53b3b1ac6583ece7de2b)
- - - - -
b4431854 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: bump T17572 timeout
(cherry picked from commit 94673d419a8cdf71d722c93da9860ad8807657e7)
(cherry picked from commit c5d97b796f6167d44501cb2ac69ef01432d38c3e)
- - - - -
980adc2e by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: bump T22744 pre_cmd timeout
(cherry picked from commit 2b5efc2d6b0b051ab0458ea0e2a2747b23190827)
(cherry picked from commit e3f42443852f73504b3854737c94a32534b4b3db)
- - - - -
2be13ac4 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: skip terminfo_so for cross ghc
(cherry picked from commit 45102e2ad39d95c06887be036722f793df236a04)
(cherry picked from commit c93876ff7cd01344dc356d66eaf9f80f661660a9)
- - - - -
908d6621 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: fix shared library size tests for cross ghc
This commit fixes shared library size tests (e.g. array_so in
testsuite/tests/perf/size/all.T) when testing cross ghc. Previously,
if shared library file extension of host and target differs, those
tests will fail with framework errors due to not finding the right
files.
(cherry picked from commit 05e40406709fd325476a0fec89488a500094ecec)
(cherry picked from commit d00c26a51a23e4fb7bc7d5c44033b9ee3e4f9149)
- - - - -
bd769e85 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: skip ghc api tests that attempt to spawn processes inside wasm
This commit skips a few ghc api tests on wasm, since they would
attempt to spawn processes inside wasm, which is not supported at all.
(cherry picked from commit fa68f83355ecca1f72f4593a1ed0422fa8fcb6a6)
(cherry picked from commit aa49631399728d6e25625205eedf66d27dc152cb)
- - - - -
1e80537e by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: skip T22840 due to broken -dtag-inference-checks on wasm
(cherry picked from commit 1241c04e72107e1648f9aba5e857b48ec3bac96f)
(cherry picked from commit 689c9267e758f3381a098ae5de120d84741fb2eb)
- - - - -
d5e9623d by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: ensure $(ghciWayFlags) can be overridden
This commit revises boilerplate.mk in testsuite as well as a few other
places, to ensure the tests that do make use of $(ghciWayFlags) can
receive the right $(ghciWayFlags) from testsuite driver config.
(cherry picked from commit 78c8b90006ac4d0a4de4e72295f8a57de4b9beca)
(cherry picked from commit 6d0cdeedc42d6571e1cd17b862f09e8027baeb75)
- - - - -
b83ceaf4 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: skip rdynamic on wasm
(cherry picked from commit 47989ecc6ddfbe68ba2213c6c2b0d29ed958c330)
(cherry picked from commit e220adb3dd370bae29e1f741bf5b4088d79f2599)
- - - - -
838e9839 by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: skip T2615 on wasm
This commit marks T2615 as skip on wasm, given LD_* environment
variables aren't supported on wasm anyway.
(cherry picked from commit fefb4ea1dee945ace173b63c808c593fc167803f)
(cherry picked from commit 39d746e16e235889e39a6a8faefaef34522af89e)
- - - - -
cb100a9c by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm
(cherry picked from commit 77c797625483be968bb51c1518020895ca5ecb11)
(cherry picked from commit 990addfc8ec7a4f13ed52f435e4f203fe60ff39b)
- - - - -
59a3f31a by Cheng Shao at 2024-10-30T16:58:18+05:30
testsuite: fix T16180 on wasm
This commit fixes T16180 on wasm once TH support is flipped on. The
fix is simply adding right asm code for wasm.
(cherry picked from commit 69bb4745218d2d54c82e33fa529ccf9ba3819fac)
(cherry picked from commit ddff197541d5974bd8067362a6828c2361c69c33)
- - - - -
66a0442d by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: fix -fexternal-interpreter flag for JS backend
Previously, -fexternal-interpreter is broken for JS backend, since GHC
would attempt to launch a non-existent ghc-iserv* executable. This
commit fixes it by adjusting pattern matching order in
setTopSessionDynFlags.
(cherry picked from commit 621c753dee540be65208d1fdcd1728ba9f2b4320)
(cherry picked from commit 4d38dc40506057c5a3449b1841414ea8378a9f42)
- - - - -
cb8d1184 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: use interpreterDynamic predicate in preloadLib
This commit use the interpreterDynamic predicate in preloadLib to
decide if we should do dynLoadObjs instead of loadObj. Previously we
used hostIsDynamic which was only written with non-cross internal
interpreter in mind.
The testsuite is also adjusted to remove hard-wired -fPIC flag for
cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and
properly pass ghc_th_way_flags to ghc.
(cherry picked from commit 80aa89831c18162ce5591400c41b4cd8f77db0e4)
(cherry picked from commit 1b30373da385f2931f77443e56156089d6218dcc)
- - - - -
752677dc by Cheng Shao at 2024-10-30T16:58:18+05:30
compiler: fix Cmm dynamic CLabels for wasm
This commit fixes the handling of dynamic CLabels for the wasm
backend. Just do the simplest handling: preserve the original CLabel,
both unreg/NCG backends can handle them properly without issue.
(cherry picked from commit 744114618678ed1eac7a699c738ffa3223d1b41a)
(cherry picked from commit 762933824140e5af24ea27c998fdca699b7b8c53)
- - - - -
49fe20a4 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: add necessary compile-time flags for wasm PIC mode
This commit adds necessary compile-time flags when compiling for wasm
PIC mode, see added comment for detailed explanation.
(cherry picked from commit f6abaf13c527e372edea2d70f9c012da8624e27c)
(cherry picked from commit 9834ac3b086c7489084edef8a81ce1155d739f30)
- - - - -
ccff9bc6 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: add necessary link-time flags for wasm shared libs
This commit adds necessary link-time flags for wasm shared libs, see
added comments for detailed explanation.
(cherry picked from commit 9745fcfbffb6434bacdec69082739c9e0229c6f2)
(cherry picked from commit 5c94cee60e631e4f5b2458377a1179cc5ad680db)
- - - - -
724a9240 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: enforce -fno-use-rpaths for wasm
This commit ensures the GHC driver never passes any RPATH-related
link-time flags on wasm, which is not supported at all.
(cherry picked from commit 649aae00c34014fcb64244de59961635563bf06a)
(cherry picked from commit 55d8b48d125fc92c5e7679c0be6202d002f8e3c1)
- - - - -
cec1a8a3 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: ensure static archives are picked when linking static .wasm modules
This commit ensures static archives are picked when linking .wasm
modules which are supposed to be fully static, even when ghc may be
invoked with -dynamic, see added comment for explanation.
(cherry picked from commit 47baa9044a786ab04b6b68cf008f1254471c3cc1)
(cherry picked from commit 1638d829e8c4c34d1a430799ea6c1a762bad9b38)
- - - - -
46f944be by Cheng Shao at 2024-10-30T16:58:18+05:30
compiler: fix dynamic_too_enable for targets that require dynamic libraries
This commit fixes dynamic_too_enable for targets whose RTS linker can
only load dynamic code.
(cherry picked from commit fc3a55917e9c6c64765f11e0703853b9eed230fe)
(cherry picked from commit ba24a6bd70c06c8e02a29cc4ca5a39488c9edfe5)
- - - - -
01684c08 by Cheng Shao at 2024-10-30T16:58:18+05:30
compiler: fix checkNonStdWay for targets that require dynamic libraries
This commit fixes checkNonStdWay to ensure that for targets whose RTS
linker can only load dynamic code, the dynamic way of object is
selected.
(cherry picked from commit 94ef949ef8b52cebaf8d4a81d7a169e100da2a73)
(cherry picked from commit 38474be061ff58bc725a90b0994669d1477fe24e)
- - - - -
205b8af3 by Cheng Shao at 2024-10-30T16:58:18+05:30
ghc-bin: enforce dynamic way when the target requires so
This commit makes ghc-bin use dynamic way when it is doing interactive
stuff on certain targets whose RTS linker can only handle dynamic
code.
(cherry picked from commit 88e992489e1574b471a55ff9ddace2c81a09ba63)
(cherry picked from commit 50dc1ac1f9ad3ba62558346ef44759794508c863)
- - - - -
fdf17574 by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian/ghci: add wasm dyld
This commit adds the wasm dynamic linker implementation, as well as
ghci logic to call it and hadrian logic to install it to the correct
location. See the top-level note in utils/jsffi/dyld.mjs for more
details.
(cherry picked from commit 549582eff80da6a8c5b7449755eaa726c208c324)
(cherry picked from commit 5b545e3c9a2ca3bdf82cc24de92c1d977c8fff57)
- - - - -
8e1d564d by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: fix getGccSearchDirectory for wasm target
This commit fixes getGccSearchDirectory logic for wasm target, ensures
the correct search directory containing libc.so etc can be found by
GHC. getGccSearchDirectory is also exported so it can be used
elsewhere to obtain the wasi-sdk libdir and pass to the dyld script.
(cherry picked from commit b562e3a6fab87422f40997f84b11a05505df2fcb)
(cherry picked from commit d3510168869357f78527df9cc0fa0197c8c2016c)
- - - - -
e7d3bf92 by Cheng Shao at 2024-10-30T16:58:18+05:30
driver: add wasm backend iserv logic
This commit adds wasm backend iserv logic to the driver, see added
comments for explanation.
(cherry picked from commit 2d6107dc0e461f6d339ea14712b6f0cb9a619680)
(cherry picked from commit c07205fc70e17ffb228ca17f0eb239f2c858fe94)
- - - - -
c20a5175 by Cheng Shao at 2024-10-30T16:58:18+05:30
compiler: add PIC support to wasm backend NCG
This commit adds support for generating PIC to the wasm backend NCG.
(cherry picked from commit 61f5baa5bd6e8d0daa20af4dc7c3213a48f99019)
(cherry picked from commit 9f8b78240c438fd8c32727f8cbce3ee644d517be)
- - - - -
7608bc46 by Cheng Shao at 2024-10-30T16:58:18+05:30
hadrian/compiler: flip on support for shared libs & ghci for wasm
This commit flips on the support for shared libs and ghci for the wasm
target, given all required support logic has been added in previous
commits.
(cherry picked from commit 652e72394b715abc931b1104a4b683bb16909695)
(cherry picked from commit e11dc80550084af2ea8aeba96e8a2a8a67468c03)
- - - - -
07832d18 by Cheng Shao at 2024-10-30T16:58:19+05:30
testsuite: flip on support for shared libs, TH & ghci for wasm
This commit flips on support for shared libs, TH & ghci for wasm in
the testsuite, given support has been landed in previous commits.
(cherry picked from commit 74a1f6818d1592ebceab8e0fbb6be1973f38fe78)
(cherry picked from commit 2e63876a44236bc67af1aa0ed71db0acf6ac04a3)
- - - - -
89adaa88 by Luite Stegeman at 2024-10-30T16:58:53+05:30
Interpreter: Add locking for communication with external interpreter
This adds locking to communication with the external interpreter
to prevent concurrent tasks interfering with each other. This
fixes Template Haskell with the external interpreter in parallel (-j)
builds.
Fixes #25083
(cherry picked from commit d5f420450e86cedca819ca401b184917c6478c1a)
- - - - -
35922587 by Alan Zimmerman at 2024-10-30T16:59:07+05:30
EPA: Remove [AddEpAnn] Commit 5
EPA: Remove [AddEpAnn] from AnnPragma
EPA: Remove [AddEpAnn] From ForeignDecl
EPA: Remove [AddEpAnn] from RoleAnnotDecl
EPA: Remove [AddEpAnn] from StandaloneKindSig
EPA: Remove [AddEpAnn] From HsDeriving
EPA: Remove [AddEpAnn] from ConDeclField
EPA: Remove [AddEpAnn] from ConDeclGADT
EPA: Remove [AddEpAnn] from ConDeclH98
EPA: Remove [AddEpAnn] from ClsInstDecl
(cherry picked from commit 7f61ed4e6f3b4d5933fa699ec2fc9dbab8052f7e)
- - - - -
744fda1b by Daneel Yaitskov at 2024-10-30T16:59:45+05:30
base: speed up traceEventIO and friends when eventlogging is turned off #17949
Check the RTS flag before doing any work with the given lazy string.
Fix #17949
Co-authored-by: Michael Peyton Jones <me at michaelpj.com>
Co-authored-by: Sylvain Henry <sylvain at haskus.fr>
Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com>
(cherry picked from commit a04959b8964c8d09897cfae1fd7b06ac53ebee95)
- - - - -
6509bb40 by Andrzej Rybczak at 2024-10-30T17:00:07+05:30
Adjust catches to properly rethrow exceptions
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception
rethrowing proposal, but it didn't adjust `catches`. This fixes it.
(cherry picked from commit 148059fea534aced44649c739cd0fad4c25a99f0)
- - - - -
db954955 by Cheng Shao at 2024-10-30T17:00:18+05:30
hadrian: fix bindist executable wrapper logic for cross targets
This commit fixes an oversight of hadrian wrapper generation logic:
when doing cross compilation, `wrapper` is called on executable names
with cross prefix, therefore we must use `isSuffixOf` when matching to
take the cross prefix into account. Also add missing cross prefix to
ghci wrapper content and fix hsc2hs wrapper logic.
(cherry picked from commit edc02197b95488e8752c988e0e92ed6253c04b8c)
- - - - -
508eb2db by Rodrigo Mesquita at 2024-10-30T17:00:58+05:30
determinism: Interface re-export list det
In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for
interface file determinism. This commit introduces 'DetOrdAvails', a
newtype that should only be constructed by sorting Avails with
'sortAvails' unless the avails are known to be deterministically
ordered. This newtype is used by 'DocStructureItem' where 'Avails' was
previously used to ensure the list of avails is deterministically sorted
by construction.
Note: Even though we order the constructors and avails in the interface
file, the order of constructors in the haddock output is still
determined from the order of declaration in the source. This was also
true before, when the list of constructors in the interface file <docs>
section was non-deterministic. Some haddock tests such as
"ConstructorArgs" observe this (check the order of constructors in
out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file)
The updated tests are caused by haddock corners where the order in the
source is not preserved (and was non-deterministic before this PR):
* Module header in the latex backend
* Re-export of pattern synonyms associated to a datatype (#25342)
Fixes #25304
(cherry picked from commit b3f7fb80781bac756efdd7fdde836bf4742a75fc)
- - - - -
16cb5517 by Rodrigo Mesquita at 2024-10-30T17:00:58+05:30
Revert "ci: Allow abi-test to fail."
After #25304, the abi-test with interface and object determinism
succeeds.
This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00.
(cherry picked from commit e39c8c993c1da534c5893ca418d1fa4cbb9e0a0a)
- - - - -
678794cd by Alan Zimmerman at 2024-10-30T17:01:12+05:30
EPA: reduce [AddEpann] in AnnList
Remove it from the `al_rest` field, and make `AnnList` parameterized
on a type to be used in `al_rest`, for the various use cases.
(cherry picked from commit 7b1b0c6deab87bfc4d2b4ddfda40ed735c28cd53)
- - - - -
e66de62b by Rodrigo Mesquita at 2024-10-30T17:01:25+05:30
Fix -fobject-determinism flag definition
The flag should be defined as an fflag to make sure the
-fno-object-determinism flag is also an available option.
Fixes #25397
(cherry picked from commit 4a00731eda964ec551f920b0319b24db2073687c)
- - - - -
f082e86e by Simon Peyton Jones at 2024-10-30T17:01:36+05:30
Fix optimisation of InstCo
It turned out (#25387) that the fix to #15725 was not quite right:
commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7
Date: Mon Oct 15 10:25:02 2018 +0200
Fix #15725 with an extra Sym
Optimising InstCo is quite subtle, and the invariants surrounding
the LiftingContext in the coercion optimiser were not stated explicitly.
This patch refactors the InstCo optimisation, and documents these
invariants. See
* Note [Optimising InstCo]
* Note [The LiftingContext in optCoercion]
I also did some refactoring of course:
* Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag
* I added some invariant-checking the coercion-construction functions
in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during
typechecking, becuase the types are un-zonked, so I can't put these
checks in GHC.Core.Coercion.)
(cherry picked from commit 23ddcc0102b3b0c31829a8f67003f4f00fb52f9a)
- - - - -
da4402b0 by Cheng Shao at 2024-10-30T17:02:27+05:30
testsuite: add T25414 test case marked as broken
This commit adds T25414 test case to demonstrate #25414. It is marked
as broken and will be fixed by the next commit.
(cherry picked from commit b1eed26f10645e8d918402b7fc29b07e0b294757)
- - - - -
d5390862 by Hassan Al-Awwadi at 2024-10-31T17:13:29+05:30
Put RdrName in the foExt field of FieldOcc
The main purpose of this commit is to rip RdrName out of FieldOcc, in
accordance with #21592, and as a side note it has simplified the method
we use to deal with ambiguity somewhat.
To do the first, we make FieldOccs store (LIdP p) instead of always
storing Located RdrName, and moved the readername to the extension
points where necessary.
For the second, well, we just turn an ambiguous RdrName into a unbound
Name through mkUnboundName. Later during disambiguateRecordBinds of the
type checking phase, we will try and do type-directed disambiguation based
on the rdrName field (for now), so this hack works out fine.
See Note [Ambiguous FieldOcc in record updates] for more details.
There are two additional minor changes in this commit:
* The HsRecSel constructor of HsExpr has been moved to the extension
constuctors, since its really GHC specific.
* HsProjection no longer has a Located DotFieldOcc as a field, but just a
regular DotFieldOcc, since DotFieldOcc already wraps a located
FieldLabelString
co-authored by: @Jade <Jade512 at proton.me>
@alt-romes <rodrigo.m.mesquita at gmail.com>
(cherry picked from commit 1587cccfe7c3c1db3ccc48437b47ccb6ae215701)
- - - - -
c580b505 by Cheng Shao at 2024-10-31T17:13:29+05:30
driver: fix foreign stub handling logic in hscParsedDecls
This patch fixes foreign stub handling logic in `hscParsedDecls`.
Previously foreign stubs were simply ignored here, so any feature that
involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch
reuses `generateByteCode` logic and eliminates a large chunk of
duplicate logic that implements Core to bytecode generation pipeline
here. Fixes #25414.
(cherry picked from commit e70009bc5b388ed02db12ee7a99bca0e4c283c87)
- - - - -
7202e2ac by Andrew Lelechenko at 2024-10-31T17:13:29+05:30
hadrian: allow -Wunused-imports for text package
(cherry picked from commit 90746a591919fc51a0ec9dec58d8f1c8397040e3)
- - - - -
4595620a by Andrew Lelechenko at 2024-10-31T17:13:29+05:30
Bump text submodule to 2.1.2
(cherry picked from commit 853050c386ff8634b950204edf4c7f8d973f9a89)
- - - - -
ccd4f869 by Zubin Duggal at 2024-10-31T17:13:29+05:30
configure: Set release version to 9.12.0 instead of 9.12.
This means our alphas will be properly named.
- - - - -
ec2f40b4 by Zubin Duggal at 2024-10-31T17:13:29+05:30
Bump binary submodule to 0.8.9.2
(cherry picked from commit 7199869a52ab45e8856658248bf807954d58cc20)
- - - - -
d2a10e25 by Ben Gamari at 2024-10-31T17:13:29+05:30
Bump process submodule to v1.6.25.0
(cherry picked from commit 18f532f3ed021fff9529f50da2006b8a8d8b1df7)
- - - - -
c0eb35df by Zubin Duggal at 2024-10-31T17:13:29+05:30
testsuite: normalise execvp vs exec differences in process tests
Fixes #25431
(cherry picked from commit a23d8e73166725b699af88a36e97c63b2a0ede25)
- - - - -
8de7406f by Zubin Duggal at 2024-11-12T13:42:19+05:30
testsuite: allow metric increase for TcPlugin_RewritePerf
this is an empty commit to allow this backports batch to be merged.
Metric Increase:
TcPlugin_RewritePerf
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- CODEOWNERS
- compiler/GHC.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToAsm/Wasm.hs
- compiler/GHC/CmmToAsm/Wasm/Asm.hs
- compiler/GHC/CmmToAsm/Wasm/Types.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion.hs-boot
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca2b21c3429a5ff780cb6c58c33c171a3c0af82b...8de7406f00c8db25fe93a1e612b2ac258aed4d3d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca2b21c3429a5ff780cb6c58c33c171a3c0af82b...8de7406f00c8db25fe93a1e612b2ac258aed4d3d
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/20241112/1b559415/attachment-0001.html>
More information about the ghc-commits
mailing list