From fbb273b1cf54675165a78730c4a3dcbdd0c036a9 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 11 Aug 2005 22:50:16 +0000 Subject: [PATCH] [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. --- ghc/compiler/profiling/SCCfinal.lhs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) -- 1.7.10.4