From 60ade746bb87a5aa76f5d6d2ca97027fc6356dc7 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Tue, 13 Feb 2007 20:30:43 +0000 Subject: [PATCH] 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 --- compiler/deSugar/DsBreakpoint.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/deSugar/DsBreakpoint.lhs b/compiler/deSugar/DsBreakpoint.lhs index 869cde6..07b3ec9 100644 --- a/compiler/deSugar/DsBreakpoint.lhs +++ b/compiler/deSugar/DsBreakpoint.lhs @@ -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 $ -- 1.7.10.4