From 6520da955ec003b3f7ba931e81df4c4f9873f185 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 1 Jun 2022 00:04:26 +0000 Subject: Split out `GHC.HsToCore.{Breakpoints,Coverage}` and use `SizedSeq` As proposed in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7508#note_432877 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7508#note_434676, `GHC.HsToCore.Ticks` is about ticks, breakpoints are separate and backend-specific (only for the bytecode interpreter), and mix entry writing is just for HPC. With this split we separate out those interpreter- and HPC-specific its, and keep the main `GHC.HsToCore.Ticks` agnostic. Also, instead of passing the reversed list and count around, we use `SizedSeq` which abstracts over the algorithm. This is much nicer to avoid noise and prevents bugs. (The bugs are not just hypothetical! I missed up the reverses on an earlier draft of this commit.) --- rts/Hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts') diff --git a/rts/Hpc.c b/rts/Hpc.c index 55e0fa355a..edbad500c0 100644 --- a/rts/Hpc.c +++ b/rts/Hpc.c @@ -241,7 +241,7 @@ startupHpc(void) /* * Called on a per-module basis, by a constructor function compiled - * with each module (see GHC.HsToCore.Ticks.hpcInitCode), declaring + * with each module (see GHC.HsToCore.Coverage.hpcInitCode), declaring * where the tix boxes are stored in memory. This memory can be uninitized, * because we will initialize it with either the contents of the tix * file, or all zeros. -- cgit v1.2.1