This MR adds a JS backend to GHC, adapted from GHCJS.
Important caveat: not every optimization has been ported from GHCJS yet. We prioritized fixing issues due to the update from GHC 8.10 (which GHCJS was using) and other correctness issues found by the testsuite. Similarly some features aren't yet available, especially Template-Haskell. We expect to work on missing features and performance after this initial merge. Status of the JS backend is tracked in #21078 (closed).
TODO before merging this:
Adapt GHCJS code into a new JS backend
Make testsuite green
Add CI job for the JS backend (cf #22128 (closed))
Extract independent changes into separate MRs for easier reviews: !9134 (closed) !9192 (closed) !9196 (merged) !9197 (closed)
Fix commit message and authors