X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcodeGen%2FCgConTbls.lhs;h=37ced1ee2b5e6e860fb1cb9b717855deea740aca;hb=553e90d9a32ee1b1809430f260c401cc4169c6c7;hp=eec28262e61af8b548ba0e72e7e358b350490fcf;hpb=895777064732d75f17dcfd51b5a25d43f3dfa120;p=ghc-hetmet.git diff --git a/ghc/compiler/codeGen/CgConTbls.lhs b/ghc/compiler/codeGen/CgConTbls.lhs index eec2826..37ced1e 100644 --- a/ghc/compiler/codeGen/CgConTbls.lhs +++ b/ghc/compiler/codeGen/CgConTbls.lhs @@ -14,9 +14,7 @@ import CgMonad import AbsCUtils ( mkAbstractCs, mkAbsCStmts ) import CgTailCall ( performReturn, mkStaticAlgReturnCode ) import ClosureInfo ( layOutStaticConstr, layOutDynConstr, ClosureInfo ) -import DataCon ( DataCon, dataConName, dataConRepArgTys, isNullaryDataCon ) -import Name ( getOccName ) -import OccName ( occNameUserString ) +import DataCon ( DataCon, dataConRepArgTys, isNullaryDataCon ) import TyCon ( tyConDataCons, isEnumerationTyCon, TyCon ) import Type ( typePrimRep ) import CmdLineOpts @@ -115,27 +113,25 @@ genConInfo comp_info data_con -- To allow the debuggers, interpreters, etc to cope with static -- data structures (ie those built at compile time), we take care that -- info-table contains the information we need. - (static_ci,_) = layOutStaticConstr con_name data_con typePrimRep arg_tys + (static_ci,_) = layOutStaticConstr data_con typePrimRep arg_tys static_body = initC comp_info ( - profCtrC SLIT("TICK_ENT_STATIC_CON") [CReg node] `thenC` + profCtrC FSLIT("TICK_ENT_STATIC_CON") [CReg node] `thenC` ldv_enter_and_body_code) closure_body = initC comp_info ( - profCtrC SLIT("TICK_ENT_DYN_CON") [CReg node] `thenC` + profCtrC FSLIT("TICK_ENT_DYN_CON") [CReg node] `thenC` ldv_enter_and_body_code) ldv_enter_and_body_code = ldvEnter `thenC` body_code - con_descr = occNameUserString (getOccName data_con) - -- Don't need any dynamic closure code for zero-arity constructors closure_code = if zero_arity_con then AbsCNop else - CClosureInfoAndCode closure_info closure_body Nothing con_descr + CClosureInfoAndCode closure_info closure_body - static_code = CClosureInfoAndCode static_ci static_body Nothing con_descr + static_code = CClosureInfoAndCode static_ci static_body zero_arity_con = isNullaryDataCon data_con -- We used to check that all the arg-sizes were zero, but we don't @@ -143,7 +139,6 @@ genConInfo comp_info data_con -- just one more thing to go wrong. arg_tys = dataConRepArgTys data_con - con_name = dataConName data_con \end{code} \begin{code} @@ -154,12 +149,11 @@ mkConCodeAndInfo con = let arg_tys = dataConRepArgTys con - (closure_info, arg_things) - = layOutDynConstr (dataConName con) con typePrimRep arg_tys + (closure_info, arg_things) = layOutDynConstr con typePrimRep arg_tys body_code = -- NB: We don't set CC when entering data (WDP 94/06) - profCtrC SLIT("TICK_RET_OLD") + profCtrC FSLIT("TICK_RET_OLD") [mkIntCLit (length arg_things)] `thenC` performReturn AbsCNop -- Ptr to thing already in Node