ghc-9.10.0.20240426: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stabilityexperimental Code generation of data constructors
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.DataCon

Description

 
Synopsis

Documentation

genCon :: ExprCtx -> DataCon -> [JStgExpr] -> G JStgStat Source #

Generate a data constructor. Special handling for unboxed tuples

allocCon :: Ident -> DataCon -> CostCentreStack -> [JStgExpr] -> G JStgStat Source #

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

allocUnboxedCon :: DataCon -> [JStgExpr] -> JStgExpr 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 #

Arguments

:: Bool

csInlineAlloc from StgToJSConfig

-> JStgExpr 
-> [JStgExpr] 
-> Maybe JStgExpr 
-> JStgExpr 

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

allocDynamic :: StgToJSConfig -> Bool -> Ident -> JStgExpr -> [JStgExpr] -> Maybe JStgExpr -> JStgStat Source #

Allocate a dynamic object