projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merging in the new codegen branch
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgStackery.lhs
diff --git
a/compiler/codeGen/CgStackery.lhs
b/compiler/codeGen/CgStackery.lhs
index
7a510cf
..
d6d9e5c
100644
(file)
--- 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}
(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,
@@
-34,6
+41,8
@@
import Util
import FastString
import OrdList
import Outputable
import FastString
import OrdList
import Outputable
+
+import Control.Monad
\end{code}
%************************************************************************
\end{code}
%************************************************************************
@@
-265,15
+274,12
@@
to reflect the frame pushed.
\begin{code}
pushUpdateFrame :: CmmExpr -> Code -> Code
\begin{code}
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
@@
-296,7
+302,7
@@
emitPushUpdateFrame frame_addr updatee = do
off_updatee :: ByteOff
off_updatee = fixedHdrSize*wORD_SIZE + oFFSET_StgUpdateFrame_updatee
off_updatee :: ByteOff
off_updatee = fixedHdrSize*wORD_SIZE + oFFSET_StgUpdateFrame_updatee
-\end{code}
+\end{code}
%************************************************************************
%************************************************************************