[Git][ghc/ghc][wip/T22491] 8 commits: Add Javascript backend

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Thu Dec 1 08:34:04 UTC 2022



Simon Peyton Jones pushed to branch wip/T22491 at Glasgow Haskell Compiler / GHC


Commits:
cc25d52e by Sylvain Henry at 2022-11-29T09:44:31+01:00
Add Javascript backend

Add JS backend adapted from the GHCJS project by Luite Stegeman.

Some features haven't been ported or implemented yet. Tests for these
features have been disabled with an associated gitlab ticket.

Bump array submodule

Work funded by IOG.

Co-authored-by: Jeffrey Young <jeffrey.young at iohk.io>
Co-authored-by: Luite Stegeman <stegeman at gmail.com>
Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com>

- - - - -
68c966cd by sheaf at 2022-11-30T09:31:25-05:00
Fix @since annotations on WithDict and Coercible

Fixes #22453

- - - - -
a3a8e9e9 by Simon Peyton Jones at 2022-11-30T09:32:03-05:00
Be more careful in GHC.Tc.Solver.Interact.solveOneFromTheOther

We were failing to account for the cc_pend_sc flag in this
important function, with the result that we expanded superclasses
forever.

Fixes #22516.

- - - - -
a9d9b8c0 by Simon Peyton Jones at 2022-11-30T09:32:03-05:00
Use mkNakedFunTy in tcPatSynSig

As #22521 showed, in tcPatSynSig we make a "fake type" to
kind-generalise; and that type has unzonked type variables in it. So
we must not use `mkFunTy` (which checks FunTy's invariants) via
`mkPhiTy` when building this type.  Instead we need to use
`mkNakedFunTy`.

Easy fix.

- - - - -
31462d98 by Andreas Klebinger at 2022-11-30T14:50:58-05:00
Properly cast values when writing/reading unboxed sums.

Unboxed sums might store a Int8# value as Int64#. This patch
makes sure we keep track of the actual value type.

See Note [Casting slot arguments] for the details.

- - - - -
10a2a7de by Oleg Grenrus at 2022-11-30T14:51:39-05:00
Move Void to GHC.Base...

This change would allow `Void` to be used deeper in module graph.
For example exported from `Prelude` (though that might be already
possible).

Also this change includes a change `stimes @Void _ x = x`,
https://github.com/haskell/core-libraries-committee/issues/95

While the above is not required, maintaining old stimes behavior
would be tricky as `GHC.Base` doesn't know about `Num` or `Integral`,
which would require more hs-boot files.

- - - - -
b4cfa8e2 by Sebastian Graf at 2022-11-30T14:52:24-05:00
DmdAnal: Reflect the `seq` of strict fields of a DataCon worker (#22475)

See the updated `Note [Data-con worker strictness]`
and the new `Note [Demand transformer for data constructors]`.

Fixes #22475.

- - - - -
a490b299 by Simon Peyton Jones at 2022-12-01T08:35:47+00:00
Add a missing varToCoreExpr in etaBodyForJoinPoint

This subtle bug showed up when compiling a library with 9.4.
See #22491.  The bug is present in master, but it is hard to
trigger; the new regression test T22491 fails in 9.4.

The fix was easy: just add a missing varToCoreExpr in
etaBodyForJoinPoint.

The fix is definitely right though!

I also did some other minor refatoring:
* Moved the preInlineUnconditionally test in simplExprF1 to
  before the call to joinPointBinding_maybe, to avoid fruitless
  eta-expansion.
* Added a boolean from_lam flag to simplNonRecE, to avoid two
  fruitless tests, and commented it a bit better.

These refactorings seem to save 0.1% on compile-time allocation in
perf/compiler; with a max saving of 1.4% in T9961

Metric Decrease:
    T9961

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps.hs
- + compiler/GHC/Builtin/PrimOps/Casts.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Rep.hs-boot
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/Backend/Internal.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- + compiler/GHC/Driver/Config/StgToJS.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Phases.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Pipeline/Phases.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- + compiler/GHC/HsToCore/Foreign/JavaScript.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3ba0f37df7b9b8f1f83ac2a31f2e13c7caeb86f1...a490b299d9d43303dc49c2df04dfc72a3915fd2c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3ba0f37df7b9b8f1f83ac2a31f2e13c7caeb86f1...a490b299d9d43303dc49c2df04dfc72a3915fd2c
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/20221201/6c1f839c/attachment.html>


More information about the ghc-commits mailing list