import AbsCUtils ( mkAbstractCs, mkAbsCStmts )
import CgTailCall ( performReturn, mkStaticAlgReturnCode )
-import CLabel ( mkConEntryLabel )
import ClosureInfo ( layOutStaticClosure, layOutDynCon,
mkConLFInfo, ClosureInfo
)
-import CostCentre ( dontCareCCS )
import DataCon ( DataCon, dataConName, dataConRepArgTys, isNullaryDataCon )
import Name ( getOccName )
import OccName ( occNameUserString )
-import PrimRep ( getPrimRepSize, PrimRep(..) )
import TyCon ( tyConDataCons, isEnumerationTyCon, TyCon )
import Type ( typePrimRep )
\end{code}
profCtrC SLIT("TICK_ENT_CON") [CReg node] `thenC`
body_code))
- entry_addr = CLbl entry_label CodePtrRep
con_descr = occNameUserString (getOccName data_con)
-- Don't need any dynamic closure code for zero-arity constructors
static_code = CClosureInfoAndCode static_ci body Nothing con_descr
- cost_centre = mkCCostCentreStack dontCareCCS -- not worried about static data costs
-
- zero_size arg_ty = getPrimRepSize (typePrimRep arg_ty) == 0
-
zero_arity_con = isNullaryDataCon data_con
-- We used to check that all the arg-sizes were zero, but we don't
-- really have any constructors with only zero-size args, and it's
-- just one more thing to go wrong.
arg_tys = dataConRepArgTys data_con
- entry_label = mkConEntryLabel con_name
con_name = dataConName data_con
\end{code}