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/simplCore | |
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/simplCore')
-rw-r--r-- | compiler/simplCore/FloatIn.lhs | 7 | ||||
-rw-r--r-- | compiler/simplCore/Simplify.lhs | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/compiler/simplCore/FloatIn.lhs b/compiler/simplCore/FloatIn.lhs index e32a8ea160..b80a8e0b2a 100644 --- a/compiler/simplCore/FloatIn.lhs +++ b/compiler/simplCore/FloatIn.lhs @@ -214,6 +214,13 @@ fiExpr to_drop (_, AnnNote InlineMe expr) = -- Ditto... don't float anything into an INLINE expression mkCoLets' to_drop (Note InlineMe (fiExpr [] expr)) +fiExpr to_drop (_, AnnNote note@(TickBox {}) expr) + = -- Wimp out for now + mkCoLets' to_drop (Note note (fiExpr [] expr)) +fiExpr to_drop (_, AnnNote note@(BinaryTickBox {}) expr) + = -- Wimp out for now + mkCoLets' to_drop (Note note (fiExpr [] expr)) + fiExpr to_drop (_, AnnNote note@(CoreNote _) expr) = Note note (fiExpr to_drop expr) \end{code} diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index 2f881d5a4a..b3e6bf7cf4 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -911,6 +911,14 @@ simplNote env InlineMe e cont simplNote env (CoreNote s) e cont = simplExpr env e `thenSmpl` \ e' -> rebuild env (Note (CoreNote s) e') cont + +simplNote env note@(TickBox {}) e cont + = simplExpr env e `thenSmpl` \ e' -> + rebuild env (Note note e') cont + +simplNote env note@(BinaryTickBox {}) e cont + = simplExpr env e `thenSmpl` \ e' -> + rebuild env (Note note e') cont \end{code} |