[Git][ghc/ghc][wip/9.14.2-backports] 5 commits: JS: fix array index for registers
Zubin pushed to branch wip/9.14.2-backports at Glasgow Haskell Compiler / GHC Commits: 7f030f76 by Sylvain Henry at 2026-07-27T18:52:57+05:30 JS: fix array index for registers We used to store R32 in h$regs[-1]. While it's correct in JavaScript, fix this to store R32 in h$regs[0] instead. (cherry picked from commit c9fa3449d78f4fe690acf26a57b1e338a2d580da) - - - - - 2ee8bc10 by Sylvain Henry at 2026-07-27T18:52:57+05:30 JS: support more than 128 registers (#26558) The JS backend only supported 128 registers (JS variables/array slots used to pass function arguments). It failed in T26537 when 129 registers were required. This commit adds support for more than 128 registers: it is now limited to maxBound :: Int (compiler's Int). If we ever go above this threshold the compiler now panics with a more descriptive message. A few built-in JS functions were assuming 128 registers and have been rewritten to use loops. Note that loops are only used for "high" registers that are stored in an array: the 31 "low" registers are still handled with JS global variables and with explicit switch-cases to maintain good performance in the most common cases (i.e. few registers used). Adjusting the number of low registers is now easy: just one constant to adjust (GHC.StgToJS.Regs.lowRegsCount). No new test added: T26537 is used as a regression test instead. (cherry picked from commit 9e46990976193d71686b070cd4c5d9c7aad43cf2) - - - - - f817f41a by Andreas Klebinger at 2026-07-27T18:52:57+05:30 testsuite: Explicitly use utf-8 encoding in rts-includes linter. Not doing so caused failures on windows, as python failed to pick a reasonable encoding even with locale set. Fixes #26850 (cherry picked from commit 01ecb61234b03b94d08ab649395e2da074a4f9d3) - - - - - 433fe334 by Zubin Duggal at 2026-07-27T18:52:57+05:30 UniqueDFM: alter should preserve insertion order Before it always inserting new elements at the end. This is problematic because instances get inserted into the map with `alterF`, which can change ordering of how instances are printed with `:info` depending on the order in which we consult interfaces I expect `alter id k = id` and `alter (fmap f) k = adjust f k`. Moving keys to the end breaks that (`adjust` already preserves position). Fixes #27532 (cherry picked from commit f6f2343fbbfdfd8aaed9babf5983e3e24c08ca85) - - - - - a2bb9069 by Zubin Duggal at 2026-07-27T18:52:57+05:30 Prepare 9.14.2 Bump filpath submodule to 1.5.5.0 Bump Win32 submodule to 2.14.2.2 Metric Increase: T4029 T13379 Metric Decrease: T5030 - - - - - 77 changed files: - − changelog.d/26616 - − changelog.d/T26978 - − changelog.d/T26979 - − changelog.d/T27046 - − changelog.d/T27047 - − changelog.d/T27123.md - − changelog.d/T27124.md - − changelog.d/T27131 - − changelog.d/T27182.md - − changelog.d/T27202 - − changelog.d/T27225 - − changelog.d/T27386 - − changelog.d/bump-process - − changelog.d/deterministic-usage-order - − changelog.d/fix-absent-dict-projection - − changelog.d/fix-blackhole-handling - − changelog.d/fix-cmm-atomic-load-store - − changelog.d/fix-compacting-gc-ap-27434 - − changelog.d/fix-exponential-case-desugar-27383 - − changelog.d/fix-finalizers-27072 - − changelog.d/fix-layout-stack-fcall - − changelog.d/fix-peekitbl-no-tntc - − changelog.d/fix-use-std-ap-thunk - − changelog.d/ghc-pkg-faster-closure - − changelog.d/hadrian-stale-package-confs-26661 - − changelog.d/jobserver-leak-fix - − changelog.d/more-efficient-home-unit-imports-finding - − changelog.d/reexported-module-errors - − changelog.d/semaphore-v2 - − changelog.d/tag-inference-27005 - − changelog.d/unused-type - − changelog.d/wasm-fix-serviceworker - − changelog.d/windows-rethrow-overlapped-exception - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Regs.hs - compiler/GHC/StgToJS/Rts/Rts.hs - compiler/GHC/StgToJS/Rts/Types.hs - compiler/GHC/Types/Unique/DFM.hs - configure.ac - docs/users_guide/9.14.2-notes.rst - hadrian/bootstrap/generate_bootstrap_plans - + hadrian/bootstrap/plan-9_10_3.json - + hadrian/bootstrap/plan-9_12_4.json - + hadrian/bootstrap/plan-bootstrap-9_10_3.json - + hadrian/bootstrap/plan-bootstrap-9_12_4.json - libraries/Win32 - libraries/base/base.cabal.in - libraries/base/changelog.md - libraries/filepath - testsuite/tests/codeGen/should_run/all.T - testsuite/tests/ghci/T16793/T16793.stdout - testsuite/tests/ghci/T18060/T18060.stdout - + testsuite/tests/ghci/T27532/Makefile - + testsuite/tests/ghci/T27532/T27532.script - + testsuite/tests/ghci/T27532/T27532.stdout - + testsuite/tests/ghci/T27532/T27532j4.stdout - + testsuite/tests/ghci/T27532/all.T - + testsuite/tests/ghci/T27532/genT27532Modules - testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout - testsuite/tests/ghci/scripts/T4175.stdout - testsuite/tests/ghci/scripts/T8469.stdout - testsuite/tests/ghci/scripts/T8535.stdout - testsuite/tests/ghci/scripts/T9881.stdout - testsuite/tests/ghci/scripts/ghci020.stdout - testsuite/tests/ghci/scripts/ghci064.stdout - testsuite/tests/ghci/should_run/T10145.stdout - testsuite/tests/ghci/should_run/T18594.stdout - testsuite/tests/linters/regex-linters/check-rts-includes.py - testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr - testsuite/tests/roles/should_compile/Roles14.stderr - testsuite/tests/roles/should_compile/Roles3.stderr - testsuite/tests/roles/should_compile/Roles4.stderr - testsuite/tests/roles/should_compile/T8958.stderr - testsuite/tests/typecheck/should_compile/T18406b.stderr - testsuite/tests/typecheck/should_compile/T18529.stderr - testsuite/tests/typecheck/should_fail/T5300.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/39eaaa6599c174fdb21edd1f17ac6ae... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/39eaaa6599c174fdb21edd1f17ac6ae... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Zubin (@wz1000)