X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FCmmExpr.hs;fp=compiler%2Fcmm%2FCmmExpr.hs;h=e1a78a707e3f026a0a34a861cbc346520c966a8c;hp=d09be34b6a943ad261435ad786cfe5b67ac37c00;hb=b25c93f1c914d81d77aeafeb49263f29bed128aa;hpb=d6d0a196363d44008a4850cddf727f06b42644f9 diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs index d09be34..e1a78a7 100644 --- a/compiler/cmm/CmmExpr.hs +++ b/compiler/cmm/CmmExpr.hs @@ -95,10 +95,26 @@ data Area deriving (Eq, Ord) data AreaId - = Old -- entry parameters, jumps, and returns share one call area at old end of stack + = Old -- See Note [Old Area] | Young BlockId deriving (Eq, Ord) +{- Note [Old Area] +~~~~~~~~~~~~~~~~~~ +There is a single call area 'Old', allocated at the extreme old +end of the stack frame (ie just younger than the return address) +which holds: + * incoming (overflow) parameters, + * outgoing (overflow) parameter to tail calls, + * outgoing (overflow) result values + * the update frame (if any) + +Its size is the max of all these requirements. On entry, the stack +pointer will point to the youngest incoming parameter, which is not +necessarily at the young end of the Old area. + +End of note -} + type SubArea = (Area, Int, Int) -- area, offset, width type SubAreaSet = FiniteMap Area [SubArea] type AreaMap = FiniteMap Area Int