[Git][ghc/ghc][wip/fendor/ghci-multiple-home-units] 4 commits: RV64: Introduce J instruction (non-local jumps) and don't deallocate stack slots for J_TBL (#25738)

Hannes Siebenhandl pushed to branch wip/fendor/ghci-multiple-home-units at Glasgow Haskell Compiler / GHC Commits: 0eef99b0 by Sven Tennie at 2025-04-24T07:34:36-04:00 RV64: Introduce J instruction (non-local jumps) and don't deallocate stack slots for J_TBL (#25738) J_TBL result in local jumps, there should not deallocate stack slots (see Note [extra spill slots].) J is for non-local jumps, these may need to deallocate stack slots. - - - - - 1bd3d13e by fendor at 2025-04-24T07:35:17-04:00 Add `UnitId` to `EvalBreakpoint` The `EvalBreakpoint` is used to communicate that a breakpoint was encountered during code evaluation. This `EvalBreakpoint` needs to be converted to an `InternalBreakpointId` which stores a `Module` to uniquely find the correct `Module` in the Home Package Table. The `EvalBreakpoint` used to store only a `ModuleName` which is then converted to a `Module` based on the currently active home unit. This is incorrect in the face of multiple home units, the break point could be in an entirely other home unit! To fix this, we additionally store the `UnitId` of the `Module` in `EvalBreakpoint` to later reconstruct the correct `Module` All of the changes are the consequence of extending `EvalBreakpoint` with the additional `ShortByteString` of the `UnitId`. For performance reasons, we store the `ShortByteString` backing the `UnitId` directly, avoiding marshalling overhead. - - - - - c1b86da8 by fendor at 2025-04-24T18:42:01+02:00 Add testcases for GHCi multiple home units Adds the following testcases: * Evaluate code with a single home unit using 'initMulti' initialisation logic * More complicated testcase with multiple home units, testing reload logic and code evaluation. - - - - - d440918e by fendor at 2025-04-24T18:42:01+02:00 Make GHCi commands compatible with multiple home units FIXME: proper commit message - - - - - 70 changed files: - compiler/GHC.hs - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/CmmToAsm/RV64/CodeGen.hs - compiler/GHC/CmmToAsm/RV64/Instr.hs - compiler/GHC/CmmToAsm/RV64/Ppr.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Breakpoints.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Rename/Unbound.hs - compiler/GHC/Runtime/Context.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Interpreter.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Types/Name/Ppr.hs - compiler/GHC/Unit/Home/Graph.hs - compiler/GHC/Unit/Types.hs - ghc/GHCi/UI.hs - ghc/GHCi/UI/Info.hs - ghc/GHCi/UI/Monad.hs - ghc/Main.hs - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/Run.hs - rts/Exception.cmm - rts/Interpreter.c - testsuite/driver/testlib.py - testsuite/tests/driver/fat-iface/fat014.stdout - testsuite/tests/driver/multipleHomeUnits/multiGHCi.stderr - testsuite/tests/ghc-api/T6145.hs - testsuite/tests/ghc-api/annotations-literals/literals.hs - testsuite/tests/ghc-api/annotations-literals/parsed.hs - testsuite/tests/ghc-api/apirecomp001/myghc.hs - testsuite/tests/ghc-api/fixed-nodes/T1.hs - testsuite/tests/ghci/linking/dyn/T3372.hs - + testsuite/tests/ghci/prog-mhu001/Makefile - + testsuite/tests/ghci/prog-mhu001/e/E.hs - + testsuite/tests/ghci/prog-mhu001/prog-mhu001.T - + testsuite/tests/ghci/prog-mhu001/prog-mhu001.script - + testsuite/tests/ghci/prog-mhu001/prog-mhu001.stdout - + testsuite/tests/ghci/prog-mhu001/unitE - + testsuite/tests/ghci/prog-mhu002/Makefile - + testsuite/tests/ghci/prog-mhu002/a/A.hs - + testsuite/tests/ghci/prog-mhu002/b/B.hs - + testsuite/tests/ghci/prog-mhu002/c/C.hs - + testsuite/tests/ghci/prog-mhu002/d/Main.hs - + testsuite/tests/ghci/prog-mhu002/prog-mhu002.T - + testsuite/tests/ghci/prog-mhu002/prog-mhu002.script - + testsuite/tests/ghci/prog-mhu002/prog-mhu002.stderr - + testsuite/tests/ghci/prog-mhu002/prog-mhu002.stdout - + testsuite/tests/ghci/prog-mhu002/unitA - + testsuite/tests/ghci/prog-mhu002/unitB - + testsuite/tests/ghci/prog-mhu002/unitC - + testsuite/tests/ghci/prog-mhu002/unitD - testsuite/tests/ghci/prog018/prog018.stdout - testsuite/tests/ghci/scripts/T13869.stdout - testsuite/tests/ghci/scripts/T13997.stdout - testsuite/tests/ghci/scripts/T17669.stdout - testsuite/tests/ghci/scripts/T18330.stdout - testsuite/tests/ghci/scripts/T1914.stdout - testsuite/tests/ghci/scripts/T20217.stdout - testsuite/tests/ghci/scripts/T20587.stdout - testsuite/tests/ghci/scripts/T6105.stdout - testsuite/tests/ghci/scripts/T8042.stdout - testsuite/tests/ghci/scripts/T8042recomp.stdout - testsuite/tests/ghci/scripts/ghci024.stdout - testsuite/tests/ghci/should_run/TopEnvIface.stdout - testsuite/tests/quasiquotation/T7918.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0736fd5a0b8afb2efe07c06ce67d92... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0736fd5a0b8afb2efe07c06ce67d92... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Hannes Siebenhandl (@fendor)