~/talk

GHC’s JavaScript Backend

Talkat 2023 GHC Contributors' Workshop · 2023-06-07..06-09· [haskell, javascript]
links:none on file
slides:none on file

GHC now ships a technology‑preview JavaScript backend (based on GHCJS code) that generates Node/browser bundles, includes a JavaScript RTS with STG trampoline scheduler and reuses the JS GC instead of the C storage manager. It compiles Haskell primops to JS (Int64 as two-number emulation instead of BigInt), produces multi‑megabyte outputs today, lets you profile and monkey‑patch generated JS at runtime, and requires Emscripten+Hadrian to build; many libraries and optimizations remain to be ported or sped up.

AI-written summary · about

  1. 0:00GHC’s JS backend intro
  2. 1:09Motivation for web backends
  3. 3:44JS backend specifics and RTS
  4. 8:09Managed platform challenges
  5. 12:10Code generation and toolchain
  6. 13:20Demo: Haskell to JS
  7. 21:01STG to JS compilation
  8. 28:38Comparison with GHCJS and its limitations
  9. 34:35Building the JS backend
  10. 40:33Implementation approach
  11. 43:32Roadmap and future
  12. 47:16Updating GHCJS libraries
  13. 51:07Demo: SVG in browser
  14. 1:04:47Execution model and heap
  15. 1:10:58Heap object construction
  16. 1:17:39Primitive type mapping
  17. 1:24:40Address and pointer handling
  18. 1:31:24Scheduler and tail calls
  19. 1:34:21Debugging JS modifications
  20. 1:38:17Template Haskell details
  21. 1:39:47JS backend components
  22. 1:40:09Contribution ideas
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.