X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgStackery.lhs;h=4196997f7a7a4fdcf330d16ce5efe35388619fa6;hb=e4417dcd4679da9c6b18c02ff667199c572bed89;hp=7b1d98605ea2621b8f8e0ebb8258996557a0e923;hpb=7fc749a43b4b6b85d234fa95d4928648259584f4;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgStackery.lhs b/compiler/codeGen/CgStackery.lhs index 7b1d986..4196997 100644 --- a/compiler/codeGen/CgStackery.lhs +++ b/compiler/codeGen/CgStackery.lhs @@ -41,6 +41,8 @@ import Util import FastString import OrdList import Outputable + +import Control.Monad \end{code} %************************************************************************ @@ -275,12 +277,10 @@ pushUpdateFrame :: CmmExpr -> Code -> Code pushUpdateFrame updatee code = do { -#ifdef DEBUG - EndOfBlockInfo _ sequel <- getEndOfBlockInfo ; - ASSERT(case sequel of { OnStack -> True; _ -> False}) -#endif - - allocStackTop (fixedHdrSize + + when debugIsOn $ do + { EndOfBlockInfo _ sequel <- getEndOfBlockInfo ; + ; MASSERT(case sequel of { OnStack -> True; _ -> False}) } + ; allocStackTop (fixedHdrSize + sIZEOF_StgUpdateFrame_NoHdr `quot` wORD_SIZE) ; vsp <- getVirtSp ; setStackFrame vsp