From: simonmar Date: Thu, 11 Aug 2005 22:50:16 +0000 (+0000) Subject: [project @ 2005-08-11 22:50:16 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~244 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fbb273b1cf54675165a78730c4a3dcbdd0c036a9;p=ghc-hetmet.git [project @ 2005-08-11 22:50:16 by simonmar] fix bug in slurpSCCs that causes SCCs to be pushed in the wrong order on closures occasionally. --- diff --git a/ghc/compiler/profiling/SCCfinal.lhs b/ghc/compiler/profiling/SCCfinal.lhs index 58c62e2..c95db9c 100644 --- a/ghc/compiler/profiling/SCCfinal.lhs +++ b/ghc/compiler/profiling/SCCfinal.lhs @@ -230,14 +230,13 @@ stgMassageForProfiling pdeps mod_name us stg_binds -} do_rhs (StgRhsClosure _ bi fv u srt args expr) - = slurpSCCs currentCCS expr `thenMM` \ (expr', ccs) -> - do_expr expr' `thenMM` \ expr'' -> + = slurpSCCs currentCCS expr `thenMM` \ (expr', ccs) -> + do_expr expr' `thenMM` \ expr'' -> returnMM (StgRhsClosure ccs bi fv u srt args expr'') where slurpSCCs ccs (StgSCC cc e) = collectCC cc `thenMM_` - slurpSCCs ccs e `thenMM` \ (e', ccs') -> - returnMM (e', pushCCOnCCS cc ccs') + slurpSCCs (cc `pushCCOnCCS` ccs) e slurpSCCs ccs e = returnMM (e, ccs)