Minor code cleanup
[ghc-hetmet.git] / compiler / cmm / CmmCPS.hs
index 0fe63a7..2726ef8 100644 (file)
@@ -10,10 +10,11 @@ import Cmm
 import CmmLint
 import PprCmm
 
-import Dataflow (fixedpoint)
+import Dataflow
 import CmmLive
 import CmmBrokenBlock
 import CmmProcPoint
+import CmmCallConv
 
 import MachOp
 import ForeignCall
@@ -217,8 +218,6 @@ selectStackFormat live continuations =
     map (\c -> (continuationLabel c, selectStackFormat' c)) continuations
     where
       selectStackFormat' (Continuation True info_table label formals blocks) =
-          --let ident = brokenBlockId $ head blocks -- TODO: CLabel isn't a uniquable, but we need a better way than this
-          --in
           StackFormat (Just label) 0 []
       selectStackFormat' (Continuation False info_table label formals blocks) =
           -- TODO: assumes the first block is the entry block
@@ -265,15 +264,14 @@ continuationToProc formats (Continuation is_entry info label formals blocks) =
                                 arguments
                         FinalJump target arguments ->
                             exit_function curr_format target arguments
-                        -- TODO: do something about global saves
                         FinalCall next (CmmForeignCall target CmmCallConv)
-                            results arguments saves ->
+                            results arguments ->
                                 pack_continuation curr_format cont_format ++
                                 [CmmJump target arguments]
                             where
                               cont_format = maybe unknown_block id $
                                             lookup (mkReturnPtLabel $ getUnique next) formats
-                        FinalCall next _ results arguments saves -> panic "unimplemented CmmCall"
+                        FinalCall next _ results arguments -> panic "unimplemented CmmCall"
 
 --------------------------------------------------------------------------------
 -- Functions that generate CmmStmt sequences
@@ -298,7 +296,7 @@ enter_function max_frame_size
      (CmmMachOp (MO_U_Lt $ cmmRegRep spReg)
                     [CmmRegOff spReg max_frame_size, CmmReg spLimReg])
      gc_block]
-    gc_block = undefined -- TODO: get stack and heap checks to go to same
+    gc_block = panic "gc_check not implemented" -- TODO: get stack and heap checks to go to same
 
 -- TODO: fix branches to proc point (we have to insert a new block to marshel the continuation)
 pack_continuation :: StackFormat -> StackFormat -> [CmmStmt]