X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmCPS.hs;h=025c12735e59c1718da2ff692a6ca4faa7988f0f;hb=85255a966b21172ce5a26c8a9cb0cdaf7315be95;hp=25f30a8951fbd0f510b6f7a42e32b4806299b01b;hpb=fd8d04119e849f9c713d3e697228846d93c5ca69;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmCPS.hs b/compiler/cmm/CmmCPS.hs index 25f30a8..025c127 100644 --- a/compiler/cmm/CmmCPS.hs +++ b/compiler/cmm/CmmCPS.hs @@ -13,6 +13,7 @@ module CmmCPS ( #include "HsVersions.h" +import BlockId import Cmm import CmmLint import PprCmm @@ -359,14 +360,14 @@ continuationMaxStack formats (Continuation _ label _ False blocks) = map stmt_arg_size (brokenBlockStmts block)) final_arg_size (FinalReturn args) = - argumentsSize (cmmExprRep . fst) args + argumentsSize (cmmExprRep . kindlessCmm) args final_arg_size (FinalJump _ args) = - argumentsSize (cmmExprRep . fst) args + argumentsSize (cmmExprRep . kindlessCmm) args final_arg_size (FinalCall next _ _ args _ _ True) = 0 final_arg_size (FinalCall next _ _ args _ _ False) = -- We have to account for the stack used when we build a frame -- for the *next* continuation from *this* continuation - argumentsSize (cmmExprRep . fst) args + + argumentsSize (cmmExprRep . kindlessCmm) args + continuation_frame_size next_format where next_format = maybe unknown_format id $ lookup next' formats @@ -375,7 +376,7 @@ continuationMaxStack formats (Continuation _ label _ False blocks) = final_arg_size _ = 0 stmt_arg_size (CmmJump _ args) = - argumentsSize (cmmExprRep . fst) args + argumentsSize (cmmExprRep . kindlessCmm) args stmt_arg_size (CmmCall _ _ _ (CmmSafe _) _) = panic "Safe call in processFormats" stmt_arg_size (CmmReturn _) =