X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgStackery.lhs;h=4196997f7a7a4fdcf330d16ce5efe35388619fa6;hb=61ed9c29ee3bdac14fb6ee7d37f979f8258d7a71;hp=7a510cf43e6244f5bef356ed0c86d91f1904612f;hpb=49c98d143c382a1341e1046f5ca00819a25691ba;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgStackery.lhs b/compiler/codeGen/CgStackery.lhs index 7a510cf..4196997 100644 --- a/compiler/codeGen/CgStackery.lhs +++ b/compiler/codeGen/CgStackery.lhs @@ -8,6 +8,13 @@ Stack-twiddling operations, which are pretty low-down and grimy. (This is the module that knows all about stack layouts, etc.) \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module CgStackery ( spRel, getVirtSp, getRealSp, setRealSp, setRealAndVirtualSp, getSpRelOffset, @@ -34,6 +41,8 @@ import Util import FastString import OrdList import Outputable + +import Control.Monad \end{code} %************************************************************************ @@ -268,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