ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.StgToJS.StgUtils

Contents

- Live vars

Synopsis

- bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id
- hasExport :: CgStgBinding -> Bool
- collectTopIds :: CgStgBinding -> [Id]
- collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id]
- removeTick :: CgStgExpr -> CgStgExpr
- isUpdatableRhs :: CgStgRhs -> Bool
- isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool)
- exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id
- type LiveVars = DVarSet
- liveVars :: LiveVars -> LiveVars
- liveStatic :: LiveVars -> LiveVars
- stgRhsLive :: CgStgRhs -> LiveVars
- stgExprLive :: Bool -> CgStgExpr -> LiveVars
- stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)]
- stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars
- stgLneLiveExpr :: CgStgRhs -> [Id]
- stgLneLive :: CgStgBinding -> [Id]
- stgLneLive' :: CgStgBinding -> [Id]

# Documentation

bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id Source #

collect Ids that this binding refers to (does not include the bindees themselves) first argument is Id -> StgExpr map for unfloated arguments

hasExport :: CgStgBinding -> Bool Source #

collectTopIds :: CgStgBinding -> [Id] Source #

collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id] Source #

removeTick :: CgStgExpr -> CgStgExpr Source #

isUpdatableRhs :: CgStgRhs -> Bool Source #

isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool) Source #

returns True if the expression is definitely inline

exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id Source #

# Live vars

type LiveVars = DVarSet Source #

liveVars :: LiveVars -> LiveVars Source #

liveStatic :: LiveVars -> LiveVars Source #

stgRhsLive :: CgStgRhs -> LiveVars Source #

stgExprLive :: Bool -> CgStgExpr -> LiveVars Source #

stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)] Source #

stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars Source #

stgLneLiveExpr :: CgStgRhs -> [Id] Source #

stgLneLive :: CgStgBinding -> [Id] Source #

stgLneLive' :: CgStgBinding -> [Id] Source #