Another small step: call and return conventions specified separately when making...
[ghc-hetmet.git] / compiler / codeGen / StgCmmHeap.hs
index 3f803d1..0e3501a 100644 (file)
@@ -337,11 +337,10 @@ These are used in the following circumstances
 entryHeapCheck :: LocalReg     -- Function (closure environment)
               -> Int           -- Arity -- not same as length args b/c of voids
               -> [LocalReg]    -- Non-void args (empty for thunk)
-              -> C_SRT
               -> FCode ()
               -> FCode ()
 
-entryHeapCheck fun arity args srt code
+entryHeapCheck fun arity args code
   = do updfr_sz <- getUpdFrameOff
        heapCheck True (gc_call updfr_sz) code   -- The 'fun' keeps relevant CAFs alive
   where
@@ -353,7 +352,7 @@ entryHeapCheck fun arity args srt code
        | otherwise  = case gc_lbl (fun : args) of
                         Just lbl -> mkJumpGC (CmmLit (CmmLabel (mkRtsCodeLabel lbl)))
                                              args' updfr_sz
-                        Nothing  -> mkCall generic_gc GC [] [] updfr_sz
+                        Nothing  -> mkCall generic_gc (GC, GC) [] [] updfr_sz
 
     gc_lbl :: [LocalReg] -> Maybe LitString
 {-
@@ -381,19 +380,19 @@ entryHeapCheck fun arity args srt code
     gc_lbl_ptrs _ = Nothing
                        
 
-altHeapCheck :: [LocalReg] -> C_SRT -> FCode a -> FCode a
-altHeapCheck regs srt code
+altHeapCheck :: [LocalReg] -> FCode a -> FCode a
+altHeapCheck regs code
   = do updfr_sz <- getUpdFrameOff
        heapCheck False (gc_call updfr_sz) code
   where
     gc_call updfr_sz
-       | null regs = mkCall generic_gc GC [] [] updfr_sz
+       | null regs = mkCall generic_gc (GC, GC) [] [] updfr_sz
 
        | Just gc_lbl <- rts_label regs -- Canned call
-       = mkCall    (CmmLit (CmmLabel (mkRtsCodeLabel gc_lbl))) GC
+       = mkCall    (CmmLit (CmmLabel (mkRtsCodeLabel gc_lbl))) (GC, GC)
                    regs (map (CmmReg . CmmLocal) regs) updfr_sz
        | otherwise             -- No canned call, and non-empty live vars
-       = mkCall generic_gc GC [] [] updfr_sz
+       = mkCall generic_gc (GC, GC) [] [] updfr_sz
 
 {-
     rts_label [reg] 
@@ -438,7 +437,7 @@ do_checks :: Bool       -- Should we check the stack?
 do_checks checkStack alloc do_gc
   = withFreshLabel "gc" $ \ loop_id ->
     withFreshLabel "gc" $ \ gc_id   ->
-      mkLabel loop_id emptyStackInfo
+      mkLabel loop_id 
       <*> (let hpCheck = if alloc == 0 then mkNop
                          else mkAssign hpReg bump_hp <*>
                               mkCmmIfThen hp_oflo (save_alloc <*> mkBranch gc_id)
@@ -446,7 +445,7 @@ do_checks checkStack alloc do_gc
                 mkCmmIfThenElse sp_oflo (mkBranch gc_id) hpCheck
               else hpCheck)
       <*> mkComment (mkFastString "outOfLine should follow:")
-      <*> outOfLine (mkLabel gc_id emptyStackInfo
+      <*> outOfLine (mkLabel gc_id 
                      <*> mkComment (mkFastString "outOfLine here")
                      <*> do_gc
                      <*> mkBranch loop_id)