X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcodeGen%2FCgCon.lhs;h=c2aa1f5fe4a1fb2ccbe93aa326848def42a7a5fd;hb=26741ec416bae2c502ef00a2ba0e79050a32cb67;hp=6c378a93eea94cddbcbb4d433b94bb16f39aa1c0;hpb=7d61cb61daa5e433a0cb85b34b7f0c58b2f961ff;p=ghc-hetmet.git diff --git a/ghc/compiler/codeGen/CgCon.lhs b/ghc/compiler/codeGen/CgCon.lhs index 6c378a9..c2aa1f5 100644 --- a/ghc/compiler/codeGen/CgCon.lhs +++ b/ghc/compiler/codeGen/CgCon.lhs @@ -16,7 +16,7 @@ module CgCon ( cgReturnDataCon ) where -import Ubiq{-uitous-} +IMP_Ubiq(){-uitous-} import CgMonad import AbsCSyn @@ -33,9 +33,8 @@ import CgCompInfo ( mAX_INTLIKE, mIN_INTLIKE ) import CgHeapery ( allocDynClosure ) import CgRetConv ( dataReturnConvAlg, DataReturnConvention(..) ) import CgTailCall ( performReturn, mkStaticAlgReturnCode ) -import CLabel ( mkClosureLabel, mkInfoTableLabel, - mkPhantomInfoTableLabel, - mkConEntryLabel, mkStdEntryLabel +import CLabel ( mkClosureLabel, mkStaticClosureLabel, + mkConInfoTableLabel, mkPhantomInfoTableLabel ) import ClosureInfo ( mkClosureLFInfo, mkConLFInfo, mkLFArgument, layOutDynCon, layOutDynClosure, @@ -45,16 +44,15 @@ import CostCentre ( currentOrSubsumedCosts, useCurrentCostCentre, dontCareCostCentre ) import Id ( idPrimRep, dataConTag, dataConTyCon, - isDataCon, DataCon(..), + isDataCon, SYN_IE(DataCon), emptyIdSet ) import Literal ( Literal(..) ) import Maybes ( maybeToBool ) +import PrelInfo ( maybeCharLikeTyCon, maybeIntLikeTyCon ) import PrimRep ( isFloatingRep, PrimRep(..) ) +import TyCon ( TyCon{-instance Uniquable-} ) import Util ( isIn, zipWithEqual, panic, assertPanic ) - -maybeCharLikeTyCon = panic "CgCon.maybeCharLikeTyCon (ToDo)" -maybeIntLikeTyCon = panic "CgCon.maybeIntLikeTyCon (ToDo)" \end{code} %************************************************************************ @@ -158,13 +156,9 @@ cgTopRhsCon name con args all_zero_size_args -- RETURN returnFC (name, stableAmodeIdInfo name (CLbl closure_label PtrRep) lf_info) where - con_tycon = dataConTyCon con - lf_info = mkConLFInfo con - - closure_label = mkClosureLabel name - info_label = mkInfoTableLabel con - con_entry_label = mkConEntryLabel con - entry_label = mkStdEntryLabel name + con_tycon = dataConTyCon con + lf_info = mkConLFInfo con + closure_label = mkClosureLabel name \end{code} The general case is: @@ -278,7 +272,7 @@ at all. buildDynCon binder cc con args all_zero_size_args@True = ASSERT(isDataCon con) returnFC (stableAmodeIdInfo binder - (CLbl (mkClosureLabel con) PtrRep) + (CLbl (mkStaticClosureLabel con) PtrRep) (mkConLFInfo con)) \end{code} @@ -428,7 +422,7 @@ cgReturnDataCon con amodes all_zero_size_args live_vars -- MAKE NODE POINT TO IT let reg_assts = move_to_reg amode node - info_lbl = mkInfoTableLabel con + info_lbl = mkConInfoTableLabel con in -- RETURN @@ -438,7 +432,7 @@ cgReturnDataCon con amodes all_zero_size_args live_vars ReturnInRegs regs -> let - reg_assts = mkAbstractCs (zipWithEqual move_to_reg amodes regs) + reg_assts = mkAbstractCs (zipWithEqual "move_to_reg" move_to_reg amodes regs) info_lbl = mkPhantomInfoTableLabel con in profCtrC SLIT("RET_NEW_IN_REGS") [mkIntCLit (length amodes)] `thenC`