X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FCmmStackLayout.hs;h=df1b89c9ba54d32423381f84f029a7663eb9647f;hp=06204ef9c3ab9b9b95f810af1b25833f7261b1dd;hb=edc0bafd3fcd01b85a2e8894e5dfe149eb0e0857;hpb=e95ee1f718c6915c478005aad8af81705357d6ab diff --git a/compiler/cmm/CmmStackLayout.hs b/compiler/cmm/CmmStackLayout.hs index 06204ef..df1b89c 100644 --- a/compiler/cmm/CmmStackLayout.hs +++ b/compiler/cmm/CmmStackLayout.hs @@ -1,6 +1,4 @@ -#if __GLASGOW_HASKELL__ >= 611 {-# OPTIONS_GHC -XNoMonoLocalBinds #-} -#endif -- Norman likes local bindings -- If this module lives on I'd like to get rid of this flag in due course @@ -358,7 +356,7 @@ layout procPoints env entry_off g = fold_succs (setSuccSPs inSp) l areaMap where inSp = expectJust "sp in" $ Map.lookup (CallArea (Young id)) areaMap - allocMidCall m@(MidForeignCall (Safe bid _) _ _ _) t areaMap = + allocMidCall m@(MidForeignCall (Safe bid _ _) _ _ _) t areaMap = let young = youngest_live areaMap $ removeLiveSlotDefs (live_in t) m area = CallArea (Young bid) areaSize' = Map.insert area (widthInBytes (typeWidth gcWord)) areaSize @@ -422,7 +420,7 @@ manifestSP areaMap entry_off g@(LGraph entry _blocks) = where spIn = sp_on_entry id replTail :: (ZTail Middle Last -> CmmBlock) -> Int -> (ZTail Middle Last) -> FuelMonad ([CmmBlock]) - replTail h spOff (ZTail m@(MidForeignCall (Safe bid _) _ _ _) t) = + replTail h spOff (ZTail m@(MidForeignCall (Safe bid _ _) _ _ _) t) = replTail (\t' -> h (setSp spOff spOff' (ZTail (middle spOff m) t'))) spOff' t where spOff' = slot' (Just bid) + widthInBytes (typeWidth gcWord) replTail h spOff (ZTail m t) = replTail (h . ZTail (middle spOff m)) spOff t