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
Showing
- compiler/GHC/ByteCode/Asm.hs 49 additions, 34 deletionscompiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs 56 additions, 53 deletionscompiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Types.hs 8 additions, 2 deletionscompiler/GHC/ByteCode/Types.hs
- compiler/GHC/CoreToIface.hs 1 addition, 3 deletionscompiler/GHC/CoreToIface.hs
- compiler/GHC/IfaceToCore.hs 1 addition, 3 deletionscompiler/GHC/IfaceToCore.hs
- compiler/GHC/StgToByteCode.hs 43 additions, 58 deletionscompiler/GHC/StgToByteCode.hs
- rts/Disassembler.c 93 additions, 67 deletionsrts/Disassembler.c
- rts/Interpreter.c 52 additions, 52 deletionsrts/Interpreter.c
- testsuite/tests/ghci/should_run/LargeBCO.hs 32 additions, 0 deletionstestsuite/tests/ghci/should_run/LargeBCO.hs
- testsuite/tests/ghci/should_run/LargeBCO.stdout 1 addition, 0 deletionstestsuite/tests/ghci/should_run/LargeBCO.stdout
- testsuite/tests/ghci/should_run/LargeBCO_A.hs 215 additions, 0 deletionstestsuite/tests/ghci/should_run/LargeBCO_A.hs
- testsuite/tests/ghci/should_run/T22888.hs 221 additions, 0 deletionstestsuite/tests/ghci/should_run/T22888.hs
- testsuite/tests/ghci/should_run/all.T 1 addition, 1 deletiontestsuite/tests/ghci/should_run/all.T
Loading
Please register or sign in to comment