ghc-9.11: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.Closure

Synopsis

Documentation

closureInfoStat :: Bool -> ClosureInfo -> JStgStat Source #

Generate statements to set infotable field values for the given ClosureInfo

Depending on debug flag, it generates h$setObjInfo(...) or h$o(...). The latter form doesn't store the pretty-printed name in the closure to save space.

closure Source #

Arguments

:: ClosureInfo

object being info'd see ciVar

-> JSM JStgStat

rhs

-> JSM JStgStat 

Special case of closures that do not need to generate any fresh names

data Closure Source #

Used to pass arguments to newClosure with some safety

Constructors

Closure 

Fields

data CopyCC Source #

Constructors

CopyCC 
DontCopyCC 
 

jsClosureCount :: Int Source #

We use this in the RTS to determine the number of generated closures. These closures use the names cached here, so we bind them to the same number.