X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FstgSyn%2FStgSyn.lhs;h=40fbef753a756e2c6dd718a4bb06f643c3fde0f5;hb=bf64f2050e84ea4afffe8af993a271a1e8dd5cab;hp=156e8dbada5737e0bc84535adba7725a3ddb6716;hpb=92bda9779666c90849c07e2c468304631089ba63;p=ghc-hetmet.git 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)