[commit: ghc] master: OccurAnal.hs: Add an assert for an invariant (e0f1054)

git at git.haskell.org git at git.haskell.org
Sun Mar 19 05:29:15 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e0f1054ba3f27de9dcffdb9b493c88c265cba6d7/ghc

>---------------------------------------------------------------

commit e0f1054ba3f27de9dcffdb9b493c88c265cba6d7
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Sun Mar 19 08:28:37 2017 +0300

    OccurAnal.hs: Add an assert for an invariant
    
    Reviewers: austin, bgamari, dfeuer
    
    Reviewed By: bgamari, dfeuer
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3360


>---------------------------------------------------------------

e0f1054ba3f27de9dcffdb9b493c88c265cba6d7
 compiler/simplCore/OccurAnal.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index baa5c24..6093f42 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -2606,7 +2606,8 @@ tagNonRecBinder lvl usage binder
  = let
      occ     = lookupDetails usage binder
      will_be_join = decideJoinPointHood lvl usage [binder]
-     occ'    | will_be_join = occ -- must already be marked AlwaysTailCalled
+     occ'    | will_be_join = -- must already be marked AlwaysTailCalled
+                              ASSERT(isAlwaysTailCalled occ) occ
              | otherwise    = markNonTailCalled occ
      binder' = setBinderOcc occ' binder
      usage'  = usage `delDetails` binder



More information about the ghc-commits mailing list