projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TysWiredIn is now warning-free
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgStackery.lhs
diff --git
a/compiler/codeGen/CgStackery.lhs
b/compiler/codeGen/CgStackery.lhs
index
7cb310d
..
4196997
100644
(file)
--- a/
compiler/codeGen/CgStackery.lhs
+++ b/
compiler/codeGen/CgStackery.lhs
@@
-1,14
+1,20
@@
%
%
+% (c) The University of Glasgow 2006
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-% $Id: CgStackery.lhs,v 1.27 2004/09/30 10:35:49 simonpj Exp $
-%
\section[CgStackery]{Stack management functions}
Stack-twiddling operations, which are pretty low-down and grimy.
(This is the module that knows all about stack layouts, etc.)
\begin{code}
\section[CgStackery]{Stack management functions}
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,
module CgStackery (
spRel, getVirtSp, getRealSp, setRealSp,
setRealAndVirtualSp, getSpRelOffset,
@@
-24,17
+30,19
@@
module CgStackery (
#include "HsVersions.h"
import CgMonad
#include "HsVersions.h"
import CgMonad
-import CgUtils ( cmmOffsetB, cmmRegOffW )
-import CgProf ( initUpdFrameProf )
+import CgUtils
+import CgProf
import SMRep
import Cmm
import SMRep
import Cmm
-import CmmUtils ( CmmStmts, mkLblExpr )
-import CLabel ( mkUpdInfoLabel )
+import CmmUtils
+import CLabel
import Constants
import Constants
-import Util ( sortLe )
-import FastString ( LitString )
-import OrdList ( toOL )
+import Util
+import FastString
+import OrdList
import Outputable
import Outputable
+
+import Control.Monad
\end{code}
%************************************************************************
\end{code}
%************************************************************************
@@
-269,12
+277,10
@@
pushUpdateFrame :: CmmExpr -> Code -> Code
pushUpdateFrame updatee code
= do {
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
sIZEOF_StgUpdateFrame_NoHdr `quot` wORD_SIZE)
; vsp <- getVirtSp
; setStackFrame vsp