projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab7222b
)
Avoid some unnecessary ticks in debugging mode
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 16 May 2007 10:05:44 +0000
(10:05 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 16 May 2007 10:05:44 +0000
(10:05 +0000)
compiler/deSugar/Coverage.lhs
patch
|
blob
|
history
diff --git
a/compiler/deSugar/Coverage.lhs
b/compiler/deSugar/Coverage.lhs
index
6f8d35f
..
a8e774e
100644
(file)
--- a/
compiler/deSugar/Coverage.lhs
+++ b/
compiler/deSugar/Coverage.lhs
@@
-177,10
+177,13
@@
addTickLHsBind (VarBind var_id var_rhs) = do
-}
addTickLHsBind other = return other
-}
addTickLHsBind other = return other
--- add a tick to the expression no matter what it is
+-- Add a tick to the expression no matter what it is. There is one exception:
+-- for the debugger, if the expression is a 'let', then we don't want to add
+-- a tick here because there will definititely be a tick on the body anyway.
addTickLHsExprAlways :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprAlways :: LHsExpr Id -> TM (LHsExpr Id)
-addTickLHsExprAlways (L pos e0) = do
- allocTickBox (ExpBox False) pos $ addTickHsExpr e0
+addTickLHsExprAlways (L pos e0)
+ | not opt_Hpc, HsLet _ _ <- e0 = addTickLHsExprNever (L pos e0)
+ | otherwise = allocTickBox (ExpBox False) pos $ addTickHsExpr e0
addTickLHsExprNeverOrAlways :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprNeverOrAlways e
addTickLHsExprNeverOrAlways :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprNeverOrAlways e