[Git][ghc/ghc][wip/ghc-9.10] 8 commits: JS: reenable h$appendToHsString optimization (#24495)
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Apr 11 18:07:06 UTC 2024
Ben Gamari pushed to branch wip/ghc-9.10 at Glasgow Haskell Compiler / GHC
Commits:
6ce42495 by Sylvain Henry at 2024-04-11T14:06:46-04:00
JS: reenable h$appendToHsString optimization (#24495)
The optimization introducing h$appendToHsString wasn't kicking in
anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30).
This patch reenables the optimization by matching on case-expression, as
done in Cmm for unpackCString# standard thunks.
The test is also T24495 added in the next commits (two commits for ease
of backporting to 9.8).
(cherry picked from commit b36ee57bfbecc628b7f0919e1e59b7066495034f)
- - - - -
cc690f6e by Sylvain Henry at 2024-04-11T14:06:46-04:00
JS: fix h$appendToHsString implementation (#24495)
h$appendToHsString needs to wrap its argument in an updatable thunk
to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is
passed, it is stored as-is in a CONS cell, making the resulting list
impossible to deepseq (forcing the thunk doesn't update the contents of
the CONS cell)!
The added test checks that the optimization kicks in and that
h$appendToHsString works as intended.
Fix #24495
(cherry picked from commit 527616e950fd8942c182be903d176f4b9890ee5a)
- - - - -
656395ec by Luite Stegeman at 2024-04-11T14:06:46-04:00
Update correct counter in bumpTickyAllocd
(cherry picked from commit 0c4a96862081f03e2946a2ed7e80c108f06205a1)
- - - - -
fb7dfdf0 by Ben Gamari at 2024-04-11T14:06:46-04:00
testsuite: Fix T24598 with unregisterised compiler
(cherry picked from commit 9b9e031b67dbc812c156a4773c0c9d293451fefa)
- - - - -
0dd8f0bc by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Use EpaLocation not SrcSpan in ForeignDecls
This allows us to update them for makeDeltaAst in ghc-exactprint
(cherry picked from commit 1324b8626aeb4dc2d6a04f7605d307ef13d1e0e9)
- - - - -
9745a63e by Simon Peyton Jones at 2024-04-11T14:06:46-04:00
Deal with duplicate tyvars in type declarations
GHC was outright crashing before this fix: #24604
(cherry picked from commit faa30b41a6f941627ddeeba805815b2742d312d1)
- - - - -
ed927271 by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Use EpaLocation for RecFieldsDotDot
So we can update it to a delta position in makeDeltaAst if needed.
(cherry picked from commit 19883a23b8bc704118fa663d8bab00a503b5a527)
- - - - -
220cda2c by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc
This allows us to use a NoCommentsLocation for the possibly trailing
comma location in a StringLiteral.
This in turn allows us to correctly roundtrip via makeDeltaAst.
(cherry picked from commit 12b997df559365e6188824fb10f5f61c2e9075e4)
- - - - -
30 changed files:
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/SourceText.hs
- compiler/GHC/Types/SrcLoc.hs
- rts/js/string.js
- testsuite/tests/ffi/should_run/T24598c_cmm.cmm
- + testsuite/tests/javascript/Makefile
- + testsuite/tests/javascript/T24495.hs
- + testsuite/tests/javascript/T24495.stdout
- testsuite/tests/javascript/all.T
- testsuite/tests/saks/should_compile/saks018.hs
- testsuite/tests/saks/should_compile/saks021.hs
- testsuite/tests/saks/should_fail/all.T
- + testsuite/tests/saks/should_fail/saks018-fail.hs
- + testsuite/tests/saks/should_fail/saks018-fail.stderr
- + testsuite/tests/saks/should_fail/saks021-fail.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d7717cc9d40b9ef7afc28af795f2e45315c9555c...220cda2c7d3055499b7b40ea4dbf2a0ed7bf18e0
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d7717cc9d40b9ef7afc28af795f2e45315c9555c...220cda2c7d3055499b7b40ea4dbf2a0ed7bf18e0
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/20240411/fb220eb4/attachment.html>
More information about the ghc-commits
mailing list