[project @ 2001-01-12 11:04:45 by simonmar]
[ghc-hetmet.git] / ghc / compiler / codeGen / CgConTbls.lhs
index a20e0ee..9c205cc 100644 (file)
@@ -11,21 +11,16 @@ module CgConTbls ( genStaticConBits ) where
 import AbsCSyn
 import CgMonad
 
-import StgSyn          ( SRT(..) )
 import AbsCUtils       ( mkAbstractCs, mkAbsCStmts )
 import CgTailCall      ( performReturn, mkStaticAlgReturnCode )
-import CLabel          ( mkConEntryLabel )
 import ClosureInfo     ( layOutStaticClosure, layOutDynCon,
                          mkConLFInfo, ClosureInfo
                        )
-import CostCentre      ( dontCareCCS )
-import FiniteMap       ( fmToList, FiniteMap )
 import DataCon         ( DataCon, dataConName, dataConRepArgTys, isNullaryDataCon )
-import Name            ( getOccString )
-import PrimRep         ( getPrimRepSize, PrimRep(..) )
+import Name            ( getOccName )
+import OccName         ( occNameUserString )
 import TyCon           ( tyConDataCons, isEnumerationTyCon, TyCon )
-import Type            ( typePrimRep, Type )
-import Outputable      
+import Type            ( typePrimRep )
 \end{code}
 
 For every constructor we generate the following info tables:
@@ -126,8 +121,7 @@ genConInfo comp_info tycon data_con
                      profCtrC SLIT("TICK_ENT_CON") [CReg node] `thenC`
                      body_code))
 
-    entry_addr = CLbl entry_label CodePtrRep
-    con_descr  = getOccString data_con
+    con_descr  = occNameUserString (getOccName data_con)
 
     -- Don't need any dynamic closure code for zero-arity constructors
     closure_code = if zero_arity_con then 
@@ -137,17 +131,12 @@ genConInfo comp_info tycon data_con
 
     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}