diff options
author | andy@galois.com <unknown> | 2006-10-24 21:29:07 +0000 |
---|---|---|
committer | andy@galois.com <unknown> | 2006-10-24 21:29:07 +0000 |
commit | d5934bbb856aa0aa620c9b2e0fa51c90a1a5a048 (patch) | |
tree | 065c061d4ff87a6ca8bff6a3a4b0fe205728e066 /compiler/simplStg | |
parent | 33b8b60e0aa925962cd11a8be98d9818666d58a0 (diff) | |
download | haskell-d5934bbb856aa0aa620c9b2e0fa51c90a1a5a048.tar.gz |
Haskell Program Coverage
This large checkin is the new ghc version of Haskell
Program Coverage, an expression-level coverage tool for Haskell.
Parts:
- Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files.
- Coverage.lhs - Annotates the HsSyn with coverage tickboxes.
- New Note's in Core,
- TickBox -- ticked on entry to sub-expression
- BinaryTickBox -- ticked on exit to sub-expression, depending
-- on the boolean result.
- New Stg level TickBox (no BinaryTickBoxes, though)
You can run the coverage tool with -fhpc at compile time.
Main must be compiled with -fhpc.
Diffstat (limited to 'compiler/simplStg')
-rw-r--r-- | compiler/simplStg/SRT.lhs | 2 | ||||
-rw-r--r-- | compiler/simplStg/StgStats.lhs | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/compiler/simplStg/SRT.lhs b/compiler/simplStg/SRT.lhs index cd118d7092..eb3229f196 100644 --- a/compiler/simplStg/SRT.lhs +++ b/compiler/simplStg/SRT.lhs @@ -116,6 +116,8 @@ srtExpr table e@(StgOpApp op args ty) = e srtExpr table (StgSCC cc expr) = StgSCC cc $! srtExpr table expr +srtExpr table (StgTick m n expr) = StgTick m n $! srtExpr table expr + srtExpr table (StgCase scrut live1 live2 uniq srt alt_type alts) = StgCase expr' live1 live2 uniq srt' alt_type alts' where diff --git a/compiler/simplStg/StgStats.lhs b/compiler/simplStg/StgStats.lhs index a91873971c..7b341fa345 100644 --- a/compiler/simplStg/StgStats.lhs +++ b/compiler/simplStg/StgStats.lhs @@ -151,6 +151,7 @@ statExpr (StgLit _) = countOne Literals statExpr (StgConApp _ _) = countOne ConstructorApps statExpr (StgOpApp _ _ _) = countOne PrimitiveApps statExpr (StgSCC l e) = statExpr e +statExpr (StgTick m n e) = statExpr e statExpr (StgLetNoEscape lvs_whole lvs_rhss binds body) = statBinding False{-not top-level-} binds `combineSE` |