X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2FsimplStg%2FUpdAnal.lhs;h=5a98a3e8d7f3d868b6f2c5644834987e4b7e3220;hb=f7ecf7234c224489be8a5e63fced903b655d92ee;hp=f4ac876495f1a7055d68c0fa1ef2c410cbb3b2b5;hpb=6c381e873e222417d9a67aeec77b9555eca7b7a8;p=ghc-hetmet.git diff --git a/ghc/compiler/simplStg/UpdAnal.lhs b/ghc/compiler/simplStg/UpdAnal.lhs index f4ac876..5a98a3e 100644 --- a/ghc/compiler/simplStg/UpdAnal.lhs +++ b/ghc/compiler/simplStg/UpdAnal.lhs @@ -1,7 +1,7 @@ \section{Update Avoidance Analyser} -*-haskell-literate-*- (c) Simon Marlow, Andre Santos 1992-1993 -(c) The AQUA Project, Glasgow University, 1995 +(c) The AQUA Project, Glasgow University, 1995-1996 %----------------------------------------------------------------------------- \subsection{Module Interface} @@ -12,18 +12,26 @@ > module UpdAnal ( updateAnalyse ) where > -> import Type ( splitTyArgs, splitSigmaTy, Class, TyVarTemplate, -> TauType(..) -> ) -> import Id -> import IdInfo -> import Outputable ( isExported ) -> import Pretty -> import SrcLoc ( mkUnknownSrcLoc ) +> IMP_Ubiq(){-uitous-} +> > import StgSyn -> import UniqSet -> import UniqSupply ( getBuiltinUniques ) -> import Util +> import Util ( panic ) +> +> updateAnalyse :: [StgBinding] -> [StgBinding] {- Exported -} +> updateAnalyse = panic "UpdAnal.updateAnalyse" +> +> {- LATER: to end of file: +> --import Type ( splitFunTy, splitSigmaTy, Class, TyVarTemplate, +> -- SYN_IE(TauType) +> -- ) +> --import Id +> --import IdInfo +> --import Pretty +> --import SrcLoc ( mkUnknownSrcLoc ) +> --import StgSyn +> --import UniqSet +> --import Unique ( getBuiltinUniques ) +> --import Util %----------------------------------------------------------------------------- \subsection{Reverse application} @@ -480,7 +488,7 @@ Convert a Closure into a representation that can be placed in a .hi file. > (combine_IdEnvs (+) c' c, b', f') > > (_,dict_tys,tau_ty) = (splitSigmaTy . idType) v -> (reg_arg_tys, _) = splitTyArgs tau_ty +> (reg_arg_tys, _) = splitFunTy tau_ty > arity = length dict_tys + length reg_arg_tys removeSuperfluous2s = reverse . dropWhile (> 1) . reverse @@ -498,10 +506,11 @@ suffice for now. > StgRec bs -> StgRec [ (attachOne v, rhs) | (v, rhs) <- bs ] > > where attachOne v -> | isExported v +> | externallyVisibleId v > = let c = lookup v p in > addIdUpdateInfo v > (mkUpdateInfo (mkUpdateSpec v c)) > | otherwise = v +> -} %-----------------------------------------------------------------------------