X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgStackery.lhs;h=b8db38d4edffa6c371d05e0350fbc7f88bbcaa61;hb=c9bf1a2ccbf93198488b1446977e50b0a5f6ecf5;hp=549de5bad1cca035c349d7153cd785cb4d85bb01;hpb=17b297d97d327620ed6bfab942f8992b2446f1bf;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgStackery.lhs b/compiler/codeGen/CgStackery.lhs index 549de5b..b8db38d 100644 --- a/compiler/codeGen/CgStackery.lhs +++ b/compiler/codeGen/CgStackery.lhs @@ -8,11 +8,11 @@ Stack-twiddling operations, which are pretty low-down and grimy. (This is the module that knows all about stack layouts, etc.) \begin{code} -{-# OPTIONS_GHC -w #-} +{-# 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/WorkingConventions#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module CgStackery ( @@ -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 @@ -303,7 +303,7 @@ emitPushUpdateFrame frame_addr updatee = do off_updatee :: ByteOff off_updatee = fixedHdrSize*wORD_SIZE + oFFSET_StgUpdateFrame_updatee -\end{code} +\end{code} %************************************************************************