[Git][ghc/ghc][wip/int-index/t2t-expr] 6 commits: js: add JStg IR, remove unsaturated constructor

Vladislav Zavialov (@int-index) gitlab at gitlab.haskell.org
Mon Oct 30 14:26:48 UTC 2023



Vladislav Zavialov pushed to branch wip/int-index/t2t-expr at Glasgow Haskell Compiler / GHC


Commits:
e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00
js: add JStg IR, remove unsaturated constructor

- Major step towards #22736 and adding the optimizer in #22261

- - - - -
35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00
Fix a bug in tail calls with ticks

See #24078 for the diagnosis.  The change affects only
the Tick case of occurrence analysis.

It's a bit hard to test, so no regression test (yet anyway).

- - - - -
9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00
Teach tag-inference about SeqOp/seq#

Fixes the STG/tag-inference analogue of #15226.

Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com>

- - - - -
34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00
[PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra

48e391952c17ff7eab10b0b1456e3f2a2af28a9b
introduced `SYM_TYPE_DUP_DISCARD` to the bitfield.

The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value.
Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us
relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions.

- - - - -
5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00
Fix and test for issue #24111, TH.Ppr output of pattern synonyms

- - - - -
bcc88161 by Vladislav Zavialov at 2023-10-30T17:21:10+03:00
T2T in Expressions (#23738)

This patch implements the T2T (term-to-type) transformation in
expressions. Given a function with a required type argument
	vfun :: forall a -> ...

the user can now call it as
	vfun (Maybe Int)

instead of
	vfun (type (Maybe Int))

The Maybe Int argument is parsed and renamed as a term (HsExpr), but then
undergoes a conversion to a type (HsType).
See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs
and Note [RequiredTypeArguments and the T2T mapping]

Left as future work: checking for puns.

- - - - -


17 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Hs/Expr.hs
- + compiler/GHC/JS/Ident.hs
- + compiler/GHC/JS/JStg/Monad.hs
- compiler/GHC/JS/Unsat/Syntax.hs → compiler/GHC/JS/JStg/Syntax.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/JS/Ppr.hs
- compiler/GHC/JS/Syntax.hs
- compiler/GHC/JS/Transform.hs
- compiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4e3837ad3f39437368fdf1aa195534b0198b90b...bcc88161d7ebdfc42fe5173c7e8c6e88347f7054

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4e3837ad3f39437368fdf1aa195534b0198b90b...bcc88161d7ebdfc42fe5173c7e8c6e88347f7054
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/20231030/f3c0e6d8/attachment-0001.html>


More information about the ghc-commits mailing list