Commit 60ade746 authored by mnislaih's avatar mnislaih

Modify the breakpoint desugaring to introduce more laziness

Benchmarks have shown that making the formation of the list of locals more lazy can improve performance of -fdebugging up to 50% in some cases
parent cf411c9a
......@@ -39,6 +39,7 @@ import Outputable
import ErrUtils
import FastString
import DynFlags
import MkId
import DsMonad
import {-#SOURCE#-}DsExpr ( dsLExpr )
......@@ -77,7 +78,8 @@ mkBreakpointExpr loc bkptFuncId ty = do
, HsLit (HsInt (fromIntegral site))]
funE = l$ HsVar jumpFuncId
ptrE = l (HsLit (HsInt (fromIntegral (I# (addr2Int# addr#)))))
locsE = l locals
locsE = l (HsApp (l(HsWrap (WpTyApp (mkListTy opaqueTy)) (HsVar lazyId)))
(l locals))
locE = l locInfo
msgE = l (srcSpanLit loc)
return $
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment