Zubin pushed to branch wip/26264 at Glasgow Haskell Compiler / GHC Commits: a4d664c7 by Cheng Shao at 2025-09-29T17:29:22+02:00 compiler/ghci: replace the LoadDLL message with LoadDLLs As a part of #25407, this commit changes the LoadDLL message to LoadDLLs, which takes a list of DLL paths to load and returns the list of remote pointer handles. The wasm dyld is refactored to take advantage of LoadDLLs and harvest background parallelism. On other platforms, LoadDLLs is based on a fallback codepath that does sequential loading. The driver is not actually emitting singular LoadDLLs message with multiple DLLs yet, this is left in subsequent commits. Co-authored-by: Codex <codex@openai.com> - - - - - c7fc4bae by Cheng Shao at 2025-09-29T17:29:22+02:00 driver: separate downsweep/upsweep phase in loadPackages' This commit refactors GHC.Linker.Loader.loadPackages' to be separated into downsweep/upsweep phases: - The downsweep phase performs dependency analysis and generates a list of topologically sorted packages to load - The upsweep phase sequentially loads these packages by calling loadPackage This is a necessary refactoring to make it possible to make loading of DLLs concurrent. - - - - - ab180104 by Cheng Shao at 2025-09-29T17:57:19+02:00 driver: emit single LoadDLLs message to load multiple DLLs This commit refactors the driver so that it emits a single LoadDLLs message to load multiple DLLs in GHC.Linker.Loader.loadPackages'. Closes #25407. ------------------------- Metric Increase: MultiLayerModulesTH_OneShot TcPlugin_RewritePerf ------------------------- Co-authored-by: Codex <codex@openai.com> - - - - - 9c304ec0 by Sean D. Gillespie at 2025-09-29T19:57:07-04:00 Fix SIZED_BIN_OP_TY_INT casts in RTS interpreter Correct `SIZED_BIN_OP_TY_INT` cast to integer. Previously, it cast its second operand as its parameter `ty`. This does not currently cause any issues, since we are only using it for bit shifts. Fixes #26287 - - - - - a1de535f by Luite Stegeman at 2025-09-30T18:40:28-04:00 rts: Fix lost wakeups in threadPaused for threads blocked on black holes The lazy blackholing code in threadPaused could overwrite closures that were already eagerly blackholed, and as such wouldn't have a marked update frame. If the black hole was overwritten by its original owner, this would lead to an undetected collision, and the contents of any existing blocking queue being lost. This adds a check for eagerly blackholed closures and avoids overwriting their contents. Fixes #26324 - - - - - b7e21e49 by Luite Stegeman at 2025-09-30T18:40:28-04:00 rts: push the correct update frame in stg_AP_STACK The frame contains an eager black hole (__stg_EAGER_BLACKHOLE_info) so we should push an stg_bh_upd_frame_info instead of an stg_upd_frame_info. - - - - - 02a7c18a by Cheng Shao at 2025-09-30T18:41:27-04:00 ghci: fix lookupSymbolInDLL behavior on wasm This patch fixes lookupSymbolInDLL behavior on wasm to return Nothing instead of throwing. On wasm, we only have lookupSymbol, and the driver would attempt to call lookupSymbolInDLL first before falling back to lookupSymbol, so lookupSymbolInDLL needs to return Nothing gracefully for the fallback behavior to work. - - - - - aa0ca5e3 by Cheng Shao at 2025-09-30T18:41:27-04:00 hadrian/compiler: enable internal-interpreter for ghc library in wasm stage1 This commit enables the internal-interpreter flag for ghc library in wasm stage1, as well as other minor adjustments to make it actually possible to launch a ghc api session that makes use of the internal interpreter. Closes #26431 #25400. - - - - - 69503668 by Cheng Shao at 2025-09-30T18:41:27-04:00 testsuite: add T26431 test case This commit adds T26431 to testsuite/tests/ghci-wasm which goes through the complete bytecode compilation/linking/running pipeline in wasm, so to witness that the ghc shared library in wasm have full support for internal-interpreter. - - - - - e9445c01 by Matthew Pickering at 2025-09-30T18:42:23-04:00 driver: Load bytecode static pointer entries during linking Previously the entries were loaded too eagerly, during upsweep, but we should delay loading them until we know that the relevant bytecode object is demanded. Towards #25230 - - - - - b8307eab by Cheng Shao at 2025-09-30T18:43:14-04:00 autoconf/ghc-toolchain: remove obsolete C99 check This patch removes obsolete c99 check from autoconf/ghc-toolchain. For all toolchain & platform combination we support, gnu11 or above is already supported without any -std flag required, and our RTS already required C11 quite a few years ago, so the C99 check is completely pointless. - - - - - 9c293544 by Simon Peyton Jones at 2025-10-01T09:36:10+01:00 Fix buglet in GHC.Core.Unify.uVarOrFam We were failing to match two totally-equal types! This led to #26457. - - - - - 554487a7 by Rodrigo Mesquita at 2025-10-01T23:04:43-04:00 cleanup: Drop obsolete comment about HsConDetails HsConDetails used to have an argument representing the type of the tyargs in a list: data HsConDetails tyarg arg rec = PrefixCon [tyarg] [arg] This datatype was shared across 3 synonyms: HsConPatDetails, HsConDeclH98Details, HsPatSynDetails. In the latter two cases, `tyarg` was instanced to `Void` meaning the list was always empty for these cases. In 7b84c58867edca57a45945a20a9391724db6d9e4, this was refactored such that HsConDetails no longer needs a type of tyargs by construction. The first case now represents the type arguments in the args type itself, with something like: ConPat "MkE" [InvisP tp1, InvisP tp2, p1, p2] So the deleted comment really is just obsolete. Fixes #26461 - - - - - 6992ac09 by Cheng Shao at 2025-10-02T07:27:55-04:00 testsuite: remove unused expected output files This patch removes unused expected output files in the testsuites on platforms that we no longer support. - - - - - 39eaaaba by Ben Gamari at 2025-10-02T07:28:45-04:00 rts: Dynamically initialize built-in closures To resolve #26166 we need to eliminate references to undefined symbols in the runtime system. One such source of these is the runtime's static references to `I#` and `C#` due the `stg_INTLIKE` and `stg_CHARLIKE` arrays. To avoid this we make these dynamic, initializing them during RTS start-up. - - - - - c254c54b by Cheng Shao at 2025-10-02T07:29:33-04:00 compiler: only invoke keepCAFsForGHCi if internal-interpreter is enabled This patch makes the ghc library only invoke keepCAFsForGHCi if internal-interpreter is enabled. For cases when it's not (e.g. the host build of a cross ghc), this avoids unnecessarily retaining all CAFs in the heap. Also fixes the type signature of c_keepCAFsForGHCi to match the C ABI. - - - - - c9ec4d43 by Simon Hengel at 2025-10-02T18:42:20-04:00 Update copyright in documentation - - - - - da9633a9 by Matthew Pickering at 2025-10-02T18:43:04-04:00 loader: Unify loadDecls and loadModuleLinkables functions These two functions nearly did the same thing. I have refactored them so that `loadDecls` now calls `loadModuleLinkables`. Fixes #26459 - - - - - 5db98d80 by Simon Hengel at 2025-10-02T18:43:53-04:00 Fix typo - - - - - 1275d360 by Matthew Pickering at 2025-10-03T06:05:56-04:00 testsuite: Use ghci_ways to set ways in PackedDataCon/UnboxedTuples/UnliftedDataTypeInterp tests These tests reimplemented the logic from `valid_way` in order to determine what ways to run. It's easier to use this combination of `only_ways` and `extra_ways` to only run in GHCi ways and always run in GHCi ways. - - - - - c06b534b by Matthew Pickering at 2025-10-03T06:06:40-04:00 Rename interpreterBackend to bytecodeBackend This is preparation for creating bytecode files. The "interpreter" is one way in which we can run bytecode objects. It is more accurate to describe that the backend produces bytecode, rather than the means by which the code will eventually run. The "interpreterBackend" binding is left as a deprecated alias. - - - - - e80f0e50 by Zubin Duggal at 2025-10-03T15:54:57+05:30 compiler: Attempt to systematize Unique tags by introducing an ADT for each different tag Fixes #26264 - - - - - 100 changed files: - compiler/GHC.hs - compiler/GHC/Builtin/Uniques.hs - compiler/GHC/Cmm/Info.hs - compiler/GHC/Cmm/Info/Build.hs - compiler/GHC/Cmm/Parser.y - compiler/GHC/Cmm/Pipeline.hs - compiler/GHC/Cmm/UniqueRenamer.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/Core/Opt/Monad.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Simplify/Monad.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Backend.hs - compiler/GHC/Driver/Backend/Internal.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Plugins.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Foreign/JavaScript.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/Iface/Binary.hs - compiler/GHC/Iface/Rename.hs - compiler/GHC/Iface/Tidy/StaticPtrTable.hs - compiler/GHC/JS/JStg/Monad.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/MacOS.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Platform/Reg.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Interpreter.hs - compiler/GHC/Runtime/Interpreter/Types.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/Pipeline.hs - compiler/GHC/StgToCmm/ExtCode.hs - compiler/GHC/StgToCmm/Monad.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Types/Name/Cache.hs - compiler/GHC/Types/Unique.hs - compiler/GHC/Types/Unique/DSM.hs - compiler/GHC/Types/Unique/Supply.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/cbits/keepCAFsForGHCi.c - compiler/ghc.cabal.in - configure.ac - distrib/configure.ac.in - docs/users_guide/conf.py - docs/users_guide/extending_ghc.rst - ghc/Main.hs - hadrian/src/Settings/Packages.hs - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/ObjLink.hs - libraries/ghci/GHCi/Run.hs - m4/fp_cmm_cpp_cmd_with_args.m4 - − m4/fp_set_cflags_c99.m4 - rts/Apply.cmm - + rts/BuiltinClosures.c - + rts/BuiltinClosures.h - rts/Interpreter.c - rts/RtsStartup.c - rts/StgMiscClosures.cmm - rts/ThreadPaused.c - rts/include/rts/Constants.h - rts/include/stg/MiscClosures.h - rts/rts.cabal - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/tests/driver/T5313.hs - testsuite/tests/ghc-api/T10052/T10052.hs - testsuite/tests/ghc-api/T8639_api.hs - testsuite/tests/ghc-api/apirecomp001/myghc.hs - + testsuite/tests/ghci-wasm/T26431.hs - + testsuite/tests/ghci-wasm/T26431.stdout - testsuite/tests/ghci-wasm/all.T - testsuite/tests/ghci/linking/dyn/T3372.hs - testsuite/tests/ghci/should_run/PackedDataCon/packeddatacon.T - testsuite/tests/ghci/should_run/UnboxedTuples/unboxedtuples.T - testsuite/tests/ghci/should_run/UnliftedDataTypeInterp/unlifteddatatypeinterp.T - testsuite/tests/perf/should_run/UniqLoop.hs - − testsuite/tests/process/process010.stdout-i386-unknown-solaris2 - testsuite/tests/regalloc/regalloc_unit_tests.hs - − testsuite/tests/rts/linker/T11223/T11223_link_order_a_b_2_fail.stderr-ws-32-mingw32 - − testsuite/tests/rts/linker/T11223/T11223_simple_duplicate_lib.stderr-ws-32-mingw32 - testsuite/tests/rts/linker/T2615.hs - − testsuite/tests/rts/outofmem.stderr-i386-apple-darwin - − testsuite/tests/rts/outofmem.stderr-i386-unknown-mingw32 - − testsuite/tests/rts/outofmem.stderr-powerpc-apple-darwin - + testsuite/tests/typecheck/should_compile/T26457.hs - testsuite/tests/typecheck/should_compile/all.T - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cc.hs - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs - utils/jsffi/dyld.mjs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/276c449aca17e5ccbc167392008d516... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/276c449aca17e5ccbc167392008d516... You're receiving this email because of your account on gitlab.haskell.org.