X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmCPSGen.hs;h=dd1887f53af3f6f24c198a6340f10671455e2884;hb=11b059fe35fe7bdcf43d4ce3246d0b9ae1671391;hp=d508184889a0c32e8fa7bd8958f3fd9ff3d1657d;hpb=b71b86cf18374f8011120c92e24ca293986e86ea;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmCPSGen.hs b/compiler/cmm/CmmCPSGen.hs index d508184..dd1887f 100644 --- a/compiler/cmm/CmmCPSGen.hs +++ b/compiler/cmm/CmmCPSGen.hs @@ -13,6 +13,7 @@ module CmmCPSGen ( ContinuationFormat(..), ) where +import BlockId import Cmm import CLabel import CmmBrokenBlock -- Data types only @@ -57,7 +58,7 @@ data Continuation info = -- Right <=> Function or Proc point CLabel -- Used to generate both info & entry labels CmmFormalsWithoutKinds -- Argument locals live on entry (C-- procedure params) - Bool -- ^ True <=> GC block so ignore stack size + Bool -- True <=> GC block so ignore stack size [BrokenBlock] -- Code, may be empty. The first block is -- the entry point. The order is otherwise initially -- unimportant, but at some point the code gen will @@ -176,12 +177,12 @@ continuationToProc (max_stack, update_frame_size, formats) stack_use uniques main_stmts = case entry of FunctionEntry _ _ _ -> - -- Ugh, the statements for an update frame must come - -- *after* the GC check that was added at the beginning - -- of the CPS pass. So we have do edit the statements - -- a bit. This depends on the knowledge that the - -- statements in the first block are only the GC check. - -- That's fragile but it works for now. + -- The statements for an update frame must come /after/ + -- the GC check that was added at the beginning of the + -- CPS pass. So we have do edit the statements a bit. + -- This depends on the knowledge that the statements in + -- the first block are only the GC check. That's + -- fragile but it works for now. gc_stmts ++ stmts ++ update_stmts ++ postfix_stmts ControlEntry -> stmts ++ postfix_stmts ContinuationEntry _ _ _ -> stmts ++ postfix_stmts