[Git][ghc/ghc][wip/T23543] 11 commits: Support large stack frames/offsets in GHCi bytecode interpreter

Ryan Scott (@RyanGlScott) gitlab at gitlab.haskell.org
Tue Jun 27 22:49:45 UTC 2023



Ryan Scott pushed to branch wip/T23543 at Glasgow Haskell Compiler / GHC


Commits:
564164ef by Luite Stegeman at 2023-06-24T10:27:29+09: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

- - - - -
8d6574bc by Sylvain Henry at 2023-06-26T13:15:06-04:00
JS: support levity-polymorphic datatypes (#22360,#22291)

- thread knowledge about levity into PrimRep instead of panicking
- JS: remove assumption that unlifted heap objects are rts objects (TVar#, etc.)

Doing this also fixes #22291 (test added).

There is a small performance hit (~1% more allocations).

Metric Increase:
    T18698a
    T18698b

- - - - -
5578bbad by Matthew Pickering at 2023-06-26T13:15:43-04:00
MR Review Template: Mention "Blocked on Review" label

In order to improve our MR review processes we now have the label
"Blocked on Review" which allows people to signal that a MR is waiting
on a review to happen.

See: https://mail.haskell.org/pipermail/ghc-devs/2023-June/021255.html

- - - - -
4427e9cf by Matthew Pickering at 2023-06-26T13:15:43-04:00
Move MR template to Default.md

This makes it more obvious what you have to modify to affect the default
template rather than looking in the project settings.

- - - - -
522bd584 by Arnaud Spiwack at 2023-06-26T13:16:33-04:00
Revert "Avoid desugaring non-recursive lets into recursive lets"

This (temporary) reverts commit 3e80c2b40213bebe302b1bd239af48b33f1b30ef.

Fixes #23550

- - - - -
c59fbb0b by Torsten Schmits at 2023-06-26T19:34:20+02:00
Propagate breakpoint information when inlining across modules

Tracking ticket: #23394

MR: !10448

* Add constructor `IfaceBreakpoint` to `IfaceTickish`
* Store breakpoint data in interface files
* Store `BreakArray` for the breakpoint's module, not the current module, in BCOs
* Store module name in BCOs instead of `Unique`, since the `Unique` from an `Iface` doesn't match the modules in GHCi's
  state
* Allocate module name in `ModBreaks`, like `BreakArray`
* Lookup breakpoint by module name in GHCi
* Skip creating breakpoint instructions when no `ModBreaks` are available, rather than injecting `ModBreaks` in the
  linker when breakpoints are enabled, and panicking when `ModBreaks` is missing

- - - - -
6f904808 by Greg Steuck at 2023-06-27T16:53:07-04:00
Remove undefined FP_PROG_LD_BUILD_ID from configure.ac's

- - - - -
e89aa072 by Andrei Borzenkov at 2023-06-27T16:53:44-04:00
Remove arity inference in type declarations (#23514)

Arity inference in type declarations was introduced
as a workaround for the lack of @k-binders.

They were added in 4aea0a72040, so I simplified all
of this by simply removing arity inference altogether.

This is part of GHC Proposal #425 "Invisible binders in type
declarations".

- - - - -
459dee1b by Torsten Schmits at 2023-06-27T16:54:20-04:00
Relax defaulting of RuntimeRep/Levity when printing

Fixes #16468

MR: !10702

Only default RuntimeRep to LiftedRep when variables are bound by the toplevel forall

- - - - -
151f8f18 by Torsten Schmits at 2023-06-27T16:54:57-04:00
Remove duplicate link label in linear types docs

- - - - -
43918aa4 by Ryan Scott at 2023-06-27T18:49:29-04:00
Fix typechecking of promoted empty lists

The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of
`'[]` (see the newly added `T23543` test case for an example), but the `'[]`
case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to
invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type
checker]`.

There are some benign changes to test cases' expected output due to the new
code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`.

Fixes #23543.

- - - - -


30 changed files:

- .gitlab/merge_request_templates/merge-request.md → .gitlab/merge_request_templates/Default.md
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Map/Expr.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Breakpoints.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Linker/Loader.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/005f5d348d60413541c078ca2932f3d7d8e2b9de...43918aa43f9d0ff10adabf37eddaa2b1754d2bcb

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/005f5d348d60413541c078ca2932f3d7d8e2b9de...43918aa43f9d0ff10adabf37eddaa2b1754d2bcb
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/20230627/7788d664/attachment.html>


More information about the ghc-commits mailing list