base: Fix #25066
As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d (cherry picked from commit eb7ddae1)
Showing
- libraries/base/changelog.md 2 additions, 0 deletionslibraries/base/changelog.md
- libraries/base/src/Control/Exception/Backtrace.hs 5 additions, 0 deletionslibraries/base/src/Control/Exception/Backtrace.hs
- libraries/base/tests/T25066.stderr 2 additions, 2 deletionslibraries/base/tests/T25066.stderr
- libraries/ghc-internal/src/GHC/Internal/Exception.hs 78 additions, 1 deletionlibraries/ghc-internal/src/GHC/Internal/Exception.hs
Loading
Please register or sign in to comment