From 8235008bb2f4126a6e35857cb4c6822522765a97 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 20 Dec 2000 10:37:38 +0000 Subject: [PATCH] [project @ 2000-12-20 10:37:38 by simonmar] use `mayHaveCafRefs'. --- ghc/compiler/simplStg/SRT.lhs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ghc/compiler/simplStg/SRT.lhs b/ghc/compiler/simplStg/SRT.lhs index c597baa..f6de6ef 100644 --- a/ghc/compiler/simplStg/SRT.lhs +++ b/ghc/compiler/simplStg/SRT.lhs @@ -12,7 +12,7 @@ module SRT where #include "HsVersions.h" import Id ( Id, idCafInfo ) -import IdInfo ( CafInfo(..) ) +import IdInfo ( mayHaveCafRefs ) import StgSyn import UniqFM @@ -97,7 +97,7 @@ srtTopBind (StgNonRec binder rhs) = extra_refs = filter (`notElem` srt) filtered_g bind_srt = reverse (extra_refs ++ srt) in - ASSERT2(null bind_srt || mayHaveCafRefs binder, ppr binder) + ASSERT2(null bind_srt || idMayHaveCafRefs binder, ppr binder) case rhs of StgRhsClosure _ _ _ _ _ _ _ -> @@ -109,7 +109,7 @@ srtTopBind (StgNonRec binder rhs) = srtTopBind (StgRec bs) = - ASSERT(null bind_srt || all mayHaveCafRefs binders) + ASSERT(null bind_srt || all idMayHaveCafRefs binders) (attach_srt_bind (StgRec new_bs) 0 (length bind_srt), bind_srt) where (binders,rhss) = unzip bs @@ -379,14 +379,11 @@ getGlobalRefs args = mkUniqSet (concat (map globalRefArg args)) globalRefArg :: StgArg -> [Id] globalRefArg (StgVarArg id) - | mayHaveCafRefs id = [id] - | otherwise = [] + | idMayHaveCafRefs id = [id] + | otherwise = [] globalRefArg _ = [] -mayHaveCafRefs id - = case idCafInfo id of - MayHaveCafRefs -> True - NoCafRefs -> False +idMayHaveCafRefs id = mayHaveCafRefs (idCafInfo id) \end{code} ----------------------------------------------------------------------------- -- 1.7.10.4