Andreas Klebinger pushed to branch wip/andreask/bomb_out at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Core/Unfold.hs
    ... ... @@ -573,6 +573,9 @@ sizeExpr opts !bOMB_OUT_SIZE top_args expr
    573 573
       = size_up sizeZero expr
    
    574 574
       where
    
    575 575
         size_up :: ExprSize -> CoreExpr -> ExprSize
    
    576
    +    size_up (TooBig) !_ = TooBig
    
    577
    +    size_up (SizeIs !s _ _) _
    
    578
    +      | s > bOMB_OUT_SIZE = TooBig
    
    576 579
         size_up s (Cast e _)  = size_up s e
    
    577 580
         size_up s (Tick _ e)  = size_up s e
    
    578 581
         size_up s (Type _)    = s           -- Types cost nothing