From bf64f2050e84ea4afffe8af993a271a1e8dd5cab Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 17 Nov 2003 14:47:53 +0000 Subject: [PATCH] [project @ 2003-11-17 14:47:52 by simonmar] GC dead code and export list entries. --- ghc/compiler/absCSyn/AbsCSyn.lhs | 7 +------ ghc/compiler/basicTypes/NewDemand.lhs | 10 ++-------- ghc/compiler/coreSyn/CoreTidy.lhs | 3 +-- ghc/compiler/coreSyn/PprCore.lhs | 4 ++-- ghc/compiler/specialise/Rules.lhs | 2 +- ghc/compiler/stgSyn/StgSyn.lhs | 26 +++----------------------- 6 files changed, 10 insertions(+), 42 deletions(-) diff --git a/ghc/compiler/absCSyn/AbsCSyn.lhs b/ghc/compiler/absCSyn/AbsCSyn.lhs index 32c0866..3c8a470 100644 --- a/ghc/compiler/absCSyn/AbsCSyn.lhs +++ b/ghc/compiler/absCSyn/AbsCSyn.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: AbsCSyn.lhs,v 1.55 2003/07/28 16:05:30 simonmar Exp $ +% $Id: AbsCSyn.lhs,v 1.56 2003/11/17 14:47:53 simonmar Exp $ % \section[AbstractC]{Abstract C: the last stop before machine code} @@ -40,8 +40,6 @@ import FastString @AbstractC@ is a list of Abstract~C statements, but the data structure is tree-ish, for easier and more efficient putting-together. \begin{code} -absCNop = AbsCNop - data AbstractC = AbsCNop | AbsCStmts AbstractC AbstractC @@ -461,9 +459,6 @@ type HeapOffset = Int -- ToDo: remove type VirtualHeapOffset = HeapOffset type VirtualSpOffset = Int - -type HpRelOffset = HeapOffset -type SpRelOffset = Int \end{code} %************************************************************************ diff --git a/ghc/compiler/basicTypes/NewDemand.lhs b/ghc/compiler/basicTypes/NewDemand.lhs index 9da7b7e..4b58fd5 100644 --- a/ghc/compiler/basicTypes/NewDemand.lhs +++ b/ghc/compiler/basicTypes/NewDemand.lhs @@ -10,7 +10,7 @@ module NewDemand( isTop, isAbsent, seqDemand, DmdType(..), topDmdType, botDmdType, mkDmdType, mkTopDmdType, - dmdTypeDepth, dmdTypeRes, seqDmdType, + dmdTypeDepth, seqDmdType, DmdEnv, emptyDmdEnv, DmdResult(..), retCPR, isBotRes, returnsCPR, resTypeArgDmd, @@ -18,7 +18,7 @@ module NewDemand( StrictSig(..), mkStrictSig, topSig, botSig, cprSig, isTopSig, - splitStrictSig, strictSigResInfo, + splitStrictSig, pprIfaceStrictSig, appIsBottom, isBottomingSig, seqStrictSig, ) where @@ -242,9 +242,6 @@ mkTopDmdType ds res = DmdType emptyDmdEnv ds res dmdTypeDepth :: DmdType -> Arity dmdTypeDepth (DmdType _ ds _) = length ds - -dmdTypeRes :: DmdType -> DmdResult -dmdTypeRes (DmdType _ _ res_ty) = res_ty \end{code} @@ -295,9 +292,6 @@ mkStrictSig dmd_ty = StrictSig dmd_ty splitStrictSig :: StrictSig -> ([Demand], DmdResult) splitStrictSig (StrictSig (DmdType _ dmds res)) = (dmds, res) -strictSigResInfo :: StrictSig -> DmdResult -strictSigResInfo (StrictSig (DmdType _ _ res)) = res - isTopSig (StrictSig ty) = isTopDmdType ty topSig, botSig, cprSig :: StrictSig diff --git a/ghc/compiler/coreSyn/CoreTidy.lhs b/ghc/compiler/coreSyn/CoreTidy.lhs index c825a6a..093067e 100644 --- a/ghc/compiler/coreSyn/CoreTidy.lhs +++ b/ghc/compiler/coreSyn/CoreTidy.lhs @@ -9,8 +9,7 @@ \begin{code} module CoreTidy ( - tidyBind, tidyExpr, - tidyBndr, tidyBndrs, tidyVarOcc, + tidyExpr, tidyVarOcc, tidyIdRules, pprTidyIdRules ) where diff --git a/ghc/compiler/coreSyn/PprCore.lhs b/ghc/compiler/coreSyn/PprCore.lhs index 541231a..29a822a 100644 --- a/ghc/compiler/coreSyn/PprCore.lhs +++ b/ghc/compiler/coreSyn/PprCore.lhs @@ -9,9 +9,9 @@ \begin{code} module PprCore ( - pprCoreExpr, pprParendExpr, pprIdBndr, + pprCoreExpr, pprParendExpr, pprCoreBinding, pprCoreBindings, pprCoreAlt, - pprIdRules, pprCoreRule + pprIdRules ) where #include "HsVersions.h" diff --git a/ghc/compiler/specialise/Rules.lhs b/ghc/compiler/specialise/Rules.lhs index 19bced3..286d357 100644 --- a/ghc/compiler/specialise/Rules.lhs +++ b/ghc/compiler/specialise/Rules.lhs @@ -6,7 +6,7 @@ \begin{code} module Rules ( RuleBase, emptyRuleBase, - extendRuleBase, extendRuleBaseList, + extendRuleBaseList, ruleBaseIds, getLocalRules, pprRuleBase, ruleCheckProgram, diff --git a/ghc/compiler/stgSyn/StgSyn.lhs b/ghc/compiler/stgSyn/StgSyn.lhs index 156e8db..40fbef7 100644 --- a/ghc/compiler/stgSyn/StgSyn.lhs +++ b/ghc/compiler/stgSyn/StgSyn.lhs @@ -30,12 +30,12 @@ module StgSyn ( StgOp(..), -- SRTs - SRT(..), noSRT, nonEmptySRT, + SRT(..), -- utils - stgBindHasCafRefs, stgArgHasCafRefs, stgRhsArity, getArgPrimRep, + stgArgHasCafRefs, isDllConApp, isStgTypeArg, - stgArgType, stgBinders, + stgArgType, pprStgBinding, pprStgBindings, pprStgBindingsWithSRTs @@ -85,10 +85,6 @@ There is one SRT for each group of bindings. data GenStgBinding bndr occ = StgNonRec bndr (GenStgRhs bndr occ) | StgRec [(bndr, GenStgRhs bndr occ)] - -stgBinders :: GenStgBinding bndr occ -> [bndr] -stgBinders (StgNonRec b _) = [b] -stgBinders (StgRec bs) = map fst bs \end{code} %************************************************************************ @@ -105,9 +101,6 @@ data GenStgArg occ \end{code} \begin{code} -getArgPrimRep (StgVarArg local) = idPrimRep local -getArgPrimRep (StgLitArg lit) = literalPrimRep lit - isStgTypeArg (StgTypeArg _) = True isStgTypeArg other = False @@ -403,19 +396,6 @@ The second flavour of right-hand-side is for constructors (simple but important) \end{code} \begin{code} -stgRhsArity :: StgRhs -> Int -stgRhsArity (StgRhsClosure _ _ _ _ _ bndrs _) = count isId bndrs - -- The arity never includes type parameters, so - -- when keeping type arguments and binders in the Stg syntax - -- (opt_RuntimeTypes) we have to fliter out the type binders. -stgRhsArity (StgRhsCon _ _ _) = 0 -\end{code} - -\begin{code} -stgBindHasCafRefs :: GenStgBinding bndr Id -> Bool -stgBindHasCafRefs (StgNonRec _ rhs) = rhsHasCafRefs rhs -stgBindHasCafRefs (StgRec binds) = any rhsHasCafRefs (map snd binds) - rhsHasCafRefs (StgRhsClosure _ _ _ upd srt _ _) = isUpdatable upd || nonEmptySRT srt rhsHasCafRefs (StgRhsCon _ _ args) -- 1.7.10.4