ghc-lib-9.8.2.20240223: The GHC API, decoupled from GHC versions
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.StgToJS.Rts.Rts

Description

Top level driver of the JavaScript Backend RTS. This file is an implementation of the JS RTS for the JS backend written as an EDSL in Haskell. It assumes the existence of pre-generated JS functions, included as js-sources in base. These functions are similarly assumed for non-inline Primops, See Prim. Most of the elements in this module are constants in Haskell Land which define pieces of the JS RTS.

Synopsis

Documentation

rts :: StgToJSConfig -> JStat Source #

Generated RTS code

assignRegs :: StgToJSConfig -> [JExpr] -> JStat Source #

Assign registers R1 ... Rn in descending order, that is assign Rn first. This function uses the assignRegs' array to construct functions which set the registers.