ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.Utils

Synopsis

Documentation

assignCoerce1 :: [TypedExpr] -> [TypedExpr] -> JStgStat Source #

Assign first expr only (if it exists), performing coercions between some PrimReps (e.g. StablePtr# and Addr#).

assocIdExprs :: Id -> [JStgExpr] -> [TypedExpr] Source #

Associate the given JExpr to the Id's PrimReps, taking into account the number of slots per PrimRep

Unboxable datacon

isUnboxableCon :: DataCon -> Bool Source #

can we unbox C x to x, only if x is represented as a Number

isUnboxable :: JSRep -> Bool Source #

one-constructor types with one primitive field represented as a JS Number can be unboxed

JSRep

slotCount :: SlotCount -> Int Source #

Return SlotCount as an Int

varSize :: JSRep -> Int Source #

Number of slots occupied by a value with the given JSRep

primRepSize :: PrimRep -> SlotCount Source #

References and Ids

Live variables

isInlineExpr :: CgStgExpr -> Bool Source #

returns True if the expression is definitely inline