projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX panic from the GHC API
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgMonad.lhs
diff --git
a/compiler/codeGen/CgMonad.lhs
b/compiler/codeGen/CgMonad.lhs
index
e3c8a77
..
b96db80
100644
(file)
--- a/
compiler/codeGen/CgMonad.lhs
+++ b/
compiler/codeGen/CgMonad.lhs
@@
-79,6
+79,7
@@
import FastString
import Outputable
import Control.Monad
import Outputable
import Control.Monad
+import Data.List
infixr 9 `thenC` -- Right-associative!
infixr 9 `thenFC`
infixr 9 `thenC` -- Right-associative!
infixr 9 `thenFC`
@@
-246,6
+247,7
@@
flattenCgStmts id stmts =
isJump (CmmJump _ _) = True
isJump (CmmBranch _) = True
isJump (CmmSwitch _ _) = True
isJump (CmmJump _ _) = True
isJump (CmmBranch _) = True
isJump (CmmSwitch _ _) = True
+isJump (CmmReturn _) = True
isJump _ = False
isOrdinaryStmt (CgStmt _) = True
isJump _ = False
isOrdinaryStmt (CgStmt _) = True
@@
-745,7
+747,7
@@
emitSimpleProc :: CLabel -> Code -> Code
emitSimpleProc lbl code
= do { stmts <- getCgStmts code
; blks <- cgStmtsToBlocks stmts
emitSimpleProc lbl code
= do { stmts <- getCgStmts code
; blks <- cgStmtsToBlocks stmts
- ; emitProc CmmNonInfo lbl [] blks }
+ ; emitProc (CmmInfo Nothing Nothing CmmNonInfoTable) lbl [] blks }
getCmm :: Code -> FCode Cmm
-- Get all the CmmTops (there should be no stmts)
getCmm :: Code -> FCode Cmm
-- Get all the CmmTops (there should be no stmts)