Fix GHCis interaction with tag inference.
I had assumed that wrappers were not inlined in interactive mode. Meaning we would always execute the compiled wrapper which properly takes care of upholding the strict field invariant. This turned out to be wrong. So instead we now run tag inference even when we generate bytecode. In that case only for correctness not performance reasons although it will be still beneficial for runtime in some cases. I further fixed a bug where GHCi didn't tag nullary constructors properly when used as arguments. Which caused segfaults when calling into compiled functions which expect the strict field invariant to be upheld. Fixes #22042 and #21083 ------------------------- Metric Increase: T4801 Metric Decrease: T13035 -------------------------
Showing
- compiler/GHC/Driver/GenerateCgIPEStub.hs 4 additions, 6 deletionscompiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs 34 additions, 26 deletionscompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline.hs 1 addition, 1 deletioncompiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs 3 additions, 3 deletionscompiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Make.hs 18 additions, 9 deletionscompiler/GHC/Iface/Make.hs
- compiler/GHC/Stg/InferTags.hs 4 additions, 5 deletionscompiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs 43 additions, 3 deletionscompiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/Stg/InferTags/TagSig.hs 10 additions, 0 deletionscompiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/Stg/Pipeline.hs 11 additions, 2 deletionscompiler/GHC/Stg/Pipeline.hs
- compiler/GHC/StgToByteCode.hs 15 additions, 4 deletionscompiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Types.hs 2 additions, 5 deletionscompiler/GHC/StgToCmm/Types.hs
- compiler/GHC/Types/Name/Set.hs 1 addition, 1 deletioncompiler/GHC/Types/Name/Set.hs
- testsuite/tests/ghci.debugger/scripts/T12458.stdout 1 addition, 1 deletiontestsuite/tests/ghci.debugger/scripts/T12458.stdout
- testsuite/tests/ghci.debugger/scripts/print018.stdout 3 additions, 3 deletionstestsuite/tests/ghci.debugger/scripts/print018.stdout
- testsuite/tests/simplStg/should_run/Makefile 9 additions, 0 deletionstestsuite/tests/simplStg/should_run/Makefile
- testsuite/tests/simplStg/should_run/T22042.hs 6 additions, 0 deletionstestsuite/tests/simplStg/should_run/T22042.hs
- testsuite/tests/simplStg/should_run/T22042.stdout 1 addition, 0 deletionstestsuite/tests/simplStg/should_run/T22042.stdout
- testsuite/tests/simplStg/should_run/T22042a.hs 10 additions, 0 deletionstestsuite/tests/simplStg/should_run/T22042a.hs
- testsuite/tests/simplStg/should_run/all.T 1 addition, 0 deletionstestsuite/tests/simplStg/should_run/all.T
Loading