[Git][ghc/ghc][wip/sjakobi/T2057] 8 commits: compiler: add myCapabilityExpr to GHC.Cmm.Utils
Simon Jakobi pushed to branch wip/sjakobi/T2057 at Glasgow Haskell Compiler / GHC Commits: a46a1bb1 by Cheng Shao at 2026-03-09T04:50:30-04:00 compiler: add myCapabilityExpr to GHC.Cmm.Utils This commit adds `myCapabilityExpr` to `GHC.Cmm.Utils` which is computed from `BaseReg`. It's convenient for codegen logic where one needs to pass the current Capability's pointer. - - - - - 4afc65b1 by Cheng Shao at 2026-03-09T04:50:30-04:00 compiler: lower tryPutMVar# into a ccall directly This patch addresses an old TODO of `stg_tryPutMVarzh` by removing it completely and making the compiler lower `tryPutMVar#` into a ccall to `performTryPutMVar` directly, without landing into an intermediate C or Cmm function. `performTryPutMVar` is promoted to a public RTS function with default visibility, and the compiler lowering logic takes into account the C ABI of `performTryPutMVar` and converts from C Bool to primop's `Int#` result properly. - - - - - 9e3d6a58 by Simon Hengel at 2026-03-09T04:51:15-04:00 Don't use #line in haddocks This confuses the parser. Haddock output is unaffected by this change. (read: this still produces the same documentation) - - - - - f4e8fec2 by Wolfgang Jeltsch at 2026-03-09T04:52:01-04:00 Remove in-package dependencies on `GHC.Internal.System.IO` This contribution eliminates all dependencies on `GHC.Internal.System.IO` from within `ghc-internal`. It comprises the following changes: * Make `GHC.Internal.Fingerprint` independent of I/O support * Tighten the dependencies of `GHC.Internal.Data.Version` * Tighten the dependencies of `GHC.Internal.TH.Monad` * Tighten the dependencies of `GHCi.Helpers` * Move some code that needs `System.IO` to `template-haskell` * Move the `GHC.ResponseFile` implementation into `base` * Move the `System.Exit` implementation into `base` * Move the `System.IO.OS` implementation into `base` Metric Decrease: size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip - - - - - 91df4c82 by Sylvain Henry at 2026-03-09T04:53:20-04:00 T18832: fix Windows CI failure by dropping removeDirectoryRecursive On Windows, open file handles prevent deletion. After killThread, the closer thread may not have called hClose yet, causing removeDirectoryRecursive to fail with "permission denied". The test harness cleans up the run directory anyway, so the call is redundant. - - - - - d7fe9671 by Cheng Shao at 2026-03-09T04:54:04-04:00 compiler: fix redundant import in GHC.StgToJS.Object This patch fixes a redundant import in GHC.StgToJS.Object that causes a build failure when compiling head from 9.14 with validate flavours. Fixes #26991. - - - - - 0bfd29c3 by Cheng Shao at 2026-03-09T04:54:46-04:00 wasm: fix `Illegal foreign declaration` failure when ghci loads modules with JSFFI exports This patch fixes a wasm ghci error when loading modules with JSFFI exports; the `backendValidityOfCExport` check in `tcCheckFEType` should only makes sense and should be performed when not checking the JavaScript calling convention; otherwise, when the calling convention is JavaScript, the codegen logic should be trusted to backends that actually make use of it. Fixes #26998. - - - - - cbf5bdc3 by Simon Jakobi at 2026-03-09T16:56:15+01:00 Add regression test for #2057 Test that GHC stops after an interface-file error instead of continuing into the linker. The test constructs a stale package dependency on purpose. `pkgB` is compiled against one version of package `A`, then the same unit id is replaced by an incompatible build of `A`. When `Main` imports `B`, GHC has to read `B.hi`, finds an unfolding that still mentions the old `A`, and should fail while loading interfaces. Closes #2057. Assisted-by: Codex - - - - - 41 changed files: - compiler/GHC/Cmm/Utils.hs - compiler/GHC/Iface/Ext/Utils.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/Tc/Gen/Foreign.hs - libraries/base/src/GHC/Fingerprint.hs - libraries/base/src/GHC/ResponseFile.hs - libraries/base/src/System/Exit.hs - libraries/base/src/System/IO/OS.hs - libraries/base/tests/IO/T18832.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/src/GHC/Internal/Data/Version.hs - libraries/ghc-internal/src/GHC/Internal/Fingerprint.hs - libraries/ghc-internal/src/GHC/Internal/GHCi/Helpers.hs - − libraries/ghc-internal/src/GHC/Internal/ResponseFile.hs - − libraries/ghc-internal/src/GHC/Internal/System/Exit.hs - − libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs - libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs - libraries/template-haskell/Language/Haskell/TH/Syntax.hs - rts/PrimOps.cmm - rts/RtsSymbols.c - rts/Threads.c - rts/Threads.h - rts/include/rts/Threads.h - rts/include/stg/MiscClosures.h - + testsuite/tests/driver/T2057/.gitignore - + testsuite/tests/driver/T2057/Makefile - + testsuite/tests/driver/T2057/README.md - + testsuite/tests/driver/T2057/T2057.stderr - + testsuite/tests/driver/T2057/all.T - + testsuite/tests/driver/T2057/app/Main.hs - + testsuite/tests/driver/T2057/pkgA1/A.hs - + testsuite/tests/driver/T2057/pkgA1/pkg.conf.in - + testsuite/tests/driver/T2057/pkgA2/A.hs - + testsuite/tests/driver/T2057/pkgA2/pkg.conf.in - + testsuite/tests/driver/T2057/pkgB/B.hs - + testsuite/tests/driver/T2057/pkgB/pkg.conf.in - testsuite/tests/ffi/should_compile/all.T - + testsuite/tests/ghci-wasm/T26998.hs - testsuite/tests/ghci-wasm/all.T The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d968566af553c83a5d113565c2453e3... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d968566af553c83a5d113565c2453e3... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)