ghc-9.6.2: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <> Luite Stegeman <> Sylvain Henry <> Josh Meredith <>
Stabilityexperimental Code generation of data constructors
Safe HaskellSafe-Inferred





genCon :: ExprCtx -> DataCon -> [JExpr] -> G JStat Source #

Generate a data constructor. Special handling for unboxed tuples

allocCon :: Ident -> DataCon -> CostCentreStack -> [JExpr] -> G JStat Source #

Allocate a data constructor. Allocate in this context means bind the data constructor to to

allocUnboxedCon :: DataCon -> [JExpr] -> JExpr Source #

Allocate an unboxed data constructor. If we have a bool we calculate the right value. If not then we expect a singleton list and unbox by converting ''C x' to x. NB. This function may panic.

allocDynamicE Source #


:: Bool

csInlineAlloc from StgToJSConfig

-> JExpr 
-> [JExpr] 
-> Maybe JExpr 
-> JExpr 

Allocate an entry function. See hs for the object layout.

allocDynamic :: StgToJSConfig -> Bool -> Ident -> JExpr -> [JExpr] -> Maybe JExpr -> JStat Source #

Allocate a dynamic object