[Git][ghc/ghc][wip/ghc-9.8] 9 commits: Support large stack frames/offsets in GHCi bytecode interpreter

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Mon Jul 10 12:26:05 UTC 2023



Ben Gamari pushed to branch wip/ghc-9.8 at Glasgow Haskell Compiler / GHC


Commits:
eccd6eae by Luite Stegeman at 2023-07-10T08:25:46-04:00
Support large stack frames/offsets in GHCi bytecode interpreter

Bytecode instructions like PUSH_L (push a local variable) contain
an operand that refers to the stack slot. Before this patch, the
operand type was SmallOp (Word16), limiting the maximum stack
offset to 65535 words. This could cause compiler panics in some
cases (See #22888).

This patch changes the operand type for stack offsets from
SmallOp to Op, removing the stack offset limit.

Fixes #22888

(cherry picked from commit 564164ef323a9f2cdeb8c69dcb2cf6df6382de4e)

- - - - -
35c054f9 by Torsten Schmits at 2023-07-10T08:25:46-04:00
Substitute free variables captured by breakpoints in SpecConstr

Fixes #23267

(cherry picked from commit 40f4ef7c40e747dfea491d297475458d2ccaf860)

- - - - -
8d7a92d0 by Torsten Schmits at 2023-07-10T08:25:46-04:00
Filter out nontrivial substituted expressions in substTickish

Fixes #23272

(cherry picked from commit 6fdcf969db85f3fe64123ba150e9226a0d2995cd)

- - - - -
dc5dae84 by Ben Bellick at 2023-07-10T08:25:46-04:00
Add some structured diagnostics in Tc/Validity.hs

This addresses the work of ticket #20118
Created the following constructors for TcRnMessage
 - TcRnInaccessibleCoAxBranch
 - TcRnPatersonCondFailure

(cherry picked from commit 03f941f45607a5ee52ca53a358333bbb41ddb1bc)

- - - - -
ae239cd4 by aadaa_fgtaa at 2023-07-10T08:25:46-04:00
Optimise ELF linker (#23464)

- cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF`
- cache shndx table in ObjectCode
- run `checkProddableBlock` only with debug rts

(cherry picked from commit b3e1436f968c0c36a27ea0339ee2554970b329fe)

- - - - -
5bedded5 by Moisés Ackerman at 2023-07-10T08:25:46-04:00
Add failing test case for #23492

(cherry picked from commit 6074cc3cda9b9836c784942a1aa7f766fb142787)

- - - - -
ac1b59f3 by Moisés Ackerman at 2023-07-10T08:25:46-04:00
Use generated src span for catch-all case of record selector functions

This fixes #23492. The problem was that we used the real source span
of the field declaration for the generated catch-all case in the
selector function, in particular in the generated call to
`recSelError`, which meant it was included in the HIE output. Using
`generatedSrcSpan` instead means that it is not included.

(cherry picked from commit 356a269258a50bf67811fe0edb193fc9f82dfad1)

- - - - -
31d4a4d6 by Moisés Ackerman at 2023-07-10T08:25:47-04:00
Introduce genLHsApp and genLHsLit helpers in GHC.Rename.Utils

(cherry picked from commit 3efe7f399a53ec7930c8a333ad2c114d956f0c2a)

- - - - -
31632aee by Moisés Ackerman at 2023-07-10T08:25:47-04:00
Construct catch-all default case using helpers

GHC.Rename.Utils concrete helpers instead of wrapGenSpan + HS AST constructors

(cherry picked from commit dd782343f131cfd983a7fb2431d9d4a9ae497551)

- - - - -


30 changed files:

- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Error/Codes.hs
- docs/users_guide/debugging.rst
- docs/users_guide/using-optimisation.rst
- libraries/base/tests/IO/all.T
- libraries/base/tests/all.T
- rts/Disassembler.c
- rts/Interpreter.c
- rts/Linker.c
- rts/LinkerInternals.h
- rts/linker/Elf.c
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/concurrent/should_run/all.T
- testsuite/tests/dependent/should_compile/T14066a.stderr
- testsuite/tests/deriving/should_fail/T8165_fail2.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/80211b508b3b7e1973fbb1d8425acd23d6bd4d07...31632aee2825dbbbc3410ad60e6cc1e71c6732f9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/80211b508b3b7e1973fbb1d8425acd23d6bd4d07...31632aee2825dbbbc3410ad60e6cc1e71c6732f9
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230710/2cdeca7f/attachment.html>


More information about the ghc-commits mailing list