Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- closureInfoStat :: Bool -> ClosureInfo -> JStgStat
- closure :: ClosureInfo -> JSM JStgStat -> JSM JStgStat
- conClosure :: Ident -> FastString -> CILayout -> Int -> JSM JStgStat
- data Closure = Closure {}
- newClosure :: Closure -> JStgExpr
- assignClosure :: JStgExpr -> Closure -> JStgStat
- data CopyCC
- = CopyCC
- | DontCopyCC
- copyClosure :: CopyCC -> JStgExpr -> JStgExpr -> JStgStat
- mkClosure :: JStgExpr -> [JStgExpr] -> JStgExpr -> Maybe JStgExpr -> Closure
- allocData :: Int -> JStgExpr
- allocClsA :: Int -> JStgExpr
- dataName :: Int -> FastString
- clsName :: Int -> FastString
- dataFieldName :: Int -> FastString
- varName :: Int -> Ident
- jsClosureCount :: Int
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.
:: ClosureInfo | object being info'd see |
-> JSM JStgStat | rhs |
-> JSM JStgStat |
Special case of closures that do not need to generate any fresh
names
conClosure :: Ident -> FastString -> CILayout -> Int -> JSM JStgStat Source #
Used to pass arguments to newClosure with some safety
newClosure :: Closure -> JStgExpr Source #
dataName :: Int -> FastString Source #
clsName :: Int -> FastString Source #
dataFieldName :: Int -> FastString Source #
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.