Cheng Shao pushed to branch wip/remove-legacy-define-in-foreign-stub at Glasgow Haskell Compiler / GHC Commits: beae879b by Rodrigo Mesquita at 2025-12-03T15:42:37+01:00 task: Substitute some datatypes for newtypes * Substitutes some data type declarations for newtype declarations * Adds comment to `LlvmConfigCache`, which must decidedly not be a newtype. Fixes #23555 - - - - - 3bd7dd44 by mangoiv at 2025-12-04T04:36:45-05:00 Renamer: reinstate the template haskell level check in notFound Out-of-scope names might be caused by a staging error, as is explained by Note [Out of scope might be a staging error] in GHC.Tc.Utils.Env.hs. This logic was assumed to be dead code after 217caad1 and has thus been removed. This commit reintroduces it and thus fixes issue #26099. - - - - - 0318010b by Zubin Duggal at 2025-12-04T04:37:27-05:00 testlib: Optionally include the way name in the expected output file This allows us to have different outputs for different ways. - - - - - 6d945fdd by Zubin Duggal at 2025-12-04T04:37:27-05:00 testsuite: Accept output of tests failing in ext-interp way due to differing compilation requirements Fixes #26552 - - - - - 0ffc5243 by Cheng Shao at 2025-12-04T04:38:09-05:00 devx: minor fixes for compile_flags.txt This patch includes minor fixes for compile_flags.txt to improve developer experience when using clangd as language server to hack on RTS C sources: - Ensure `-fPIC` is passed and `__PIC__` is defined, to be coherent with `-DDYNAMIC` and ensure the `__PIC__` guarded code paths are indexed - Add the missing `-DRtsWay` definition, otherwise a few source files like `RtsUtils.c` and `Trace.c` would produce clangd errors - - - - - e36a5fcb by Matthew Pickering at 2025-12-05T16:25:57-05:00 Add support for building bytecode libraries A bytecode library is a collection of bytecode files (.gbc) and a library which combines together additional object files. A bytecode library is created by invoking GHC with the `-bytecodelib` flag. A library can be created from in-memory `ModuleByteCode` linkables or by passing `.gbc` files as arguments on the command line. Fixes #26298 - - - - - 8f9ae339 by Matthew Pickering at 2025-12-05T16:25:57-05:00 Load bytecode libraries to satisfy package dependencies This commit allows you to use a bytecode library to satisfy a package dependency when using the interpreter. If a user enables `-fprefer-byte-code`, then if a package provides a bytecode library, that will be loaded and used to satisfy the dependency. The main change is to separate the relevant parts of the `LoaderState` into external and home package byte code. Bytecode is loaded into either the home package or external part (similar to HPT/EPS split), HPT bytecode can be unloaded. External bytecode is never unloaded. The unload function has also only been called with an empty list of "stable linkables" for a long time. It has been modified to directly implement a complete unloading of the home package bytecode linkables. At the moment, the bytecode libraries are found in the "library-dirs" field from the package description. In the future when `Cabal` implements support for "bytecode-library-dirs" field, we can read the bytecode libraries from there. No changes to the Cabal submodule are necessary at the moment. Four new tests are added in testsuite/tests/cabal, which generate fake package descriptions and test loading the libraries into GHCi. Fixes #26298 - - - - - 54458ce4 by mangoiv at 2025-12-05T16:26:50-05:00 ExplicitLevelImports: improve documentation of the code - more explicit names for variable names like `flg` or `topLevel` - don't pass the same value twice to functions - some explanations of interesting but undocumented code paths - adjust comment to not mention non-existent error message - - - - - c7061392 by mangoiv at 2025-12-05T16:27:42-05:00 driver: don't expect nodes to exist when checking paths between them In `mgQueryZero`, previously node lookups were expected to never fail, i.e. it was expected that when calculating the path between two nodes in a zero level import graph, both nodes would always exist. This is not the case, e.g. in some situations involving exact names (see the test-case). The fix is to first check whether the node is present in the graph at all, instead of panicking, just to report that there is no path. Closes #26568 - - - - - d6cf8463 by Peng Fan at 2025-12-06T11:06:28-05:00 NCG/LA64: Simplify genCCall into two parts genCCall is too long, so it's been simplified into two parts: genPrim and genLibCCall. Suggested by Andreas Klebinger - - - - - 9d371d23 by Matthew Pickering at 2025-12-06T11:07:09-05:00 hadrian: Use a response file to invoke GHC for dep gathering. In some cases we construct an argument list too long for GHC to handle directly on windows. This happens when we generate the dependency file because the command line will contain references to a large number of .hs files. To avoid this we now invoke GHC using a response file when generating dependencies to sidestep length limitations. Note that we only pass the actual file names in the dependency file. Why? Because this side-steps #26560 - - - - - 0043bfb0 by Marc Scholten at 2025-12-06T11:08:03-05:00 update xhtml to 3000.4.0.0 haddock-api: bump xhtml bounds haddock-api: use lazy text instead of string to support xhtml 3000.4.0.0 Bumping submodule xhtml to 3000.4.0.0 add xhtml to stage0Packages remove unused import of writeUtf8File Remove redundant import Update haddock golden files for xhtml 3000.4.0.0 Metric Decrease: haddock.Cabal haddock.base - - - - - fc958fc9 by Julian Ospald at 2025-12-06T11:08:53-05:00 rts: Fix object file format detection in loadArchive Commit 76d1041dfa4b96108cfdd22b07f2b3feb424dcbe seems to have introduced this bug, ultimately leading to failure of test T11788. I can only theorize that this test isn't run in upstream's CI, because they don't build a static GHC. The culprit is that we go through the thin archive, trying to follow the members on the filesystem, but don't re-identify the new object format of the member. This pins `object_fmt` to `NotObject` from the thin archive. Thanks to @angerman for spotting this. - - - - - 0f297f6e by mangoiv at 2025-12-06T11:09:44-05:00 users' guide: don't use f strings in the python script to ensure compatibility with python 3.5 - - - - - 3bfe7aa2 by Matthew Pickering at 2025-12-07T12:18:57-05:00 ci: Try using multi repl in ghc-in-ghci test This should be quite a bit faster than the ./hadrian/ghci command as it doesn't properly build all the dependencies. - - - - - 2ef1601a by Rodrigo Mesquita at 2025-12-07T12:19:38-05:00 Stack.Decode: Don't error on bitmap size 0 A RET_BCO may have a bitmap with no payload. In that case, the bitmap = 0. One can observe this by using -ddump-bcos and interpreting ``` main = pure () ``` Observe, for instance, that the BCO for this main function has size 0: ``` ProtoBCO Main.main#0: \u [] breakmain:Main,0() GHC.Internal.Base.pure GHC.Internal.Base.$fApplicativeIO GHC.Internal.Tuple.() bitmap: 0 [] BRK_FUN <breakarray> main:Main 0 <cc> PACK () 0 PUSH_G GHC.Internal.Base.$fApplicativeIO PUSH_APPLY_PP PUSH_G GHC.Internal.Base.pure ENTER ``` Perhaps we never tried to decode a stack in which a BCO like this was present. However, for the debugger, we want to decode stacks of threads stopped at breakpoints, and these kind of BCOs do get on a stack under e.g. `stg_apply_interp_info` frames. See the accompanying test in the next commit for an example to trigger the bug this commit fixes. Fixes #26640 - - - - - 747153d2 by Rodrigo Mesquita at 2025-12-07T12:19:38-05:00 Add test for #26640 - - - - - d4b1e353 by Simon Hengel at 2025-12-10T00:00:02-05:00 Fix syntax error in gadt_syntax.rst - - - - - 91cc8be6 by Cheng Shao at 2025-12-10T00:00:43-05:00 ci: fix "ci.sh clean" to address frequent out of space error on windows runners This patch fixes the `ci.sh clean` logic to address frequent out of space error on windows runners; previously it didn't clean up the inplace mingw blobs, which is the largest source of space leak on windows runners. See added comment for detailed explanation. - - - - - 536680d7 by Cheng Shao at 2025-12-10T12:03:30+01:00 compiler: remove unused CPP code in foreign stub This patch removes unused CPP code in the generated foreign stub: - `#define IN_STG_CODE 0` is not needed, since `Rts.h` already includes this definition - The `if defined(__cplusplus)` code paths are not needed in the `.c` file, since we don't generate C++ stubs and don't include C++ headers in our stubs. But it still needs to be present in the `.h` header since it might be later included into C++ source files. - - - - - 118 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - compile_flags.txt - compiler/GHC/ByteCode/Linker.hs - compiler/GHC/ByteCode/Serialize.hs - compiler/GHC/CmmToAsm/AArch64/RegInfo.hs - compiler/GHC/CmmToAsm/LA64/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/RegInfo.hs - compiler/GHC/Core/Map/Type.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Errors/Types.hs - compiler/GHC/Driver/LlvmConfigCache.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Phases.hs - compiler/GHC/Driver/Session.hs - + compiler/GHC/Linker/ByteCode.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Rename/Splice.hs - compiler/GHC/Runtime/Debugger.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Settings.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Unit/Home/PackageTable.hs - compiler/GHC/Unit/Info.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/State.hs - compiler/ghc.cabal.in - docs/users_guide/conf.py - docs/users_guide/exts/gadt_syntax.rst - docs/users_guide/phases.rst - hadrian/src/Builder.hs - hadrian/src/Rules/ToolArgs.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Default.hs - libraries/ghc-boot/GHC/Unit/Database.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs - libraries/xhtml - rts/linker/LoadArchive.c - testsuite/config/ghc - testsuite/driver/testlib.py - testsuite/mk/boilerplate.mk - + testsuite/tests/bytecode/T26640.hs - + testsuite/tests/bytecode/T26640.script - + testsuite/tests/bytecode/T26640.stdout - testsuite/tests/bytecode/all.T - + testsuite/tests/cabal/Bytecode.hs - + testsuite/tests/cabal/BytecodeForeign.c - + testsuite/tests/cabal/BytecodeForeign.hs - testsuite/tests/cabal/Makefile - testsuite/tests/cabal/all.T - + testsuite/tests/cabal/bytecode.pkg - + testsuite/tests/cabal/bytecode.script - + testsuite/tests/cabal/bytecode_foreign.pkg - + testsuite/tests/cabal/bytecode_foreign.script - testsuite/tests/cabal/ghcpkg03.stderr - testsuite/tests/cabal/ghcpkg03.stderr-mingw32 - testsuite/tests/cabal/ghcpkg05.stderr - testsuite/tests/cabal/ghcpkg05.stderr-mingw32 - + testsuite/tests/cabal/pkg_bytecode.stderr - + testsuite/tests/cabal/pkg_bytecode.stdout - + testsuite/tests/cabal/pkg_bytecode_foreign.stderr - + testsuite/tests/cabal/pkg_bytecode_foreign.stdout - + testsuite/tests/cabal/pkg_bytecode_with_gbc.stderr - + testsuite/tests/cabal/pkg_bytecode_with_gbc.stdout - + testsuite/tests/cabal/pkg_bytecode_with_o.stderr - + testsuite/tests/cabal/pkg_bytecode_with_o.stdout - + testsuite/tests/driver/T20696/T20696.stderr-ext-interp - testsuite/tests/driver/T20696/all.T - testsuite/tests/driver/bytecode-object/Makefile - testsuite/tests/driver/bytecode-object/all.T - testsuite/tests/driver/bytecode-object/bytecode_object19.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object20.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object21.stderr - + testsuite/tests/driver/bytecode-object/bytecode_object21.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object23.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object24.stdout - testsuite/tests/driver/fat-iface/all.T - + testsuite/tests/driver/fat-iface/fat012.stderr-ext-interp - + testsuite/tests/driver/fat-iface/fat015.stderr-ext-interp - + testsuite/tests/splice-imports/SI07.stderr-ext-interp - testsuite/tests/splice-imports/all.T - + testsuite/tests/th/T26099.hs - + testsuite/tests/th/T26099.stderr - + testsuite/tests/th/T26568.hs - + testsuite/tests/th/T26568.stderr - testsuite/tests/th/all.T - utils/ghc-pkg/Main.hs - utils/haddock/cabal.project - utils/haddock/haddock-api/haddock-api.cabal - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Names.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs - utils/haddock/haddock-api/src/Haddock/Doc.hs - utils/haddock/haddock-api/src/Haddock/Utils.hs - utils/haddock/html-test/ref/Bug26.html - utils/haddock/html-test/ref/Bug298.html - utils/haddock/html-test/ref/Bug458.html - utils/haddock/html-test/ref/Nesting.html - utils/haddock/html-test/ref/TitledPicture.html - utils/haddock/html-test/ref/Unicode.html - utils/haddock/html-test/ref/Unicode2.html The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/af3e2a558fd489da67599bec7d0c5b2... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/af3e2a558fd489da67599bec7d0c5b2... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Cheng Shao (@TerrorJack)