Skip to main content

IOG GHC Update #9

· 2 min read

Biweekly update from the GHC DevX team at IOG.

Previous updates can be found here.

JavaScript backend​

  • Luite: has published a blog post about how Stacks work in the JS backend: https://engineering.iog.io/2023-04-21-stacks-in-the-js-backend

  • Jeff: GHC!10260, which adds a small optimizer to the JS backend, has landed in master.

  • Josh & Sylvain: fixed the -fcheck-prim-bound feature for the JS backend. See GHC#23123 and GHC!10234

  • Luite: improved gc pause times for the JS backend for programs that do not use weak references, by omitting heap scans if there are no pending finalizers. See GHC!10379

  • Josh: refactored some code related to saturated/unsaturated ASTs:

    • First, the identsS/identsE/identsV functions were changed to take a Sat.JStat instead of an Unsat.JStat as an argument, since they previously would raise an error when encountering an unsaturated constructor (Sat.JStat and Unsat.JStat are identical other than this constructor) GHC#23304GHC!10348
    • Then, jsSaturate and satJStat were combined into one function. Previously, jsSaturate would instantiate unsaturated constructors in a JStat AST, but retain the Unsat.JStat type, and satJStat would separately traverse the AST to make the simple type conversion. Since jsSaturate was never used without calling satJStat directly after, these can be combined to traverse the AST and instantiate unsaturated constructors in one pass. GHC#23328GHC!10369
  • Josh: Added the type of an STG closure to various STG data types so that it's passed through GHC.CoreToStg.PreStgRhs and GHC.CoreToStg.StgRhsClosure. With this, we no longer have to guess types based on other information available during JavaScript code generation. This fixes some issues that were revealed in the testsuite. GHC!10261

GHC Proposal #0134 (Deprecated Exports)​

  • Bartek: found a bug in warnings about duplicate exports when exporting T(..). See GHC#23318

  • Bartek: Finished exporting part of the renamer for the Deprecating Exports proposal. See GHC!10283

Performance​

  • Jeff: First case study on performance engineering for the Haskell Optimization Handbook is done and has been published.

  • Josh: Added a GHC testsuite performance test for measuring memory allocations of encoding. GHC!10347

Modularity​

Tooling​