@@ -248,8 +248,8 @@ execTxWithCov tx = do
248248 Just (vec, pc) -> do
249249 let txResultBit = fromEnum $ getResult $ fst r
250250 VMut. read vec pc >>= \ case
251- (opIx, depths, txResults, execQty ) | not (txResults `testBit` txResultBit) -> do
252- VMut. write vec pc (opIx, depths, txResults `setBit` txResultBit, execQty )
251+ (opIx, depths, txResults) | not (txResults `testBit` txResultBit) -> do
252+ VMut. write vec pc (opIx, depths, txResults `setBit` txResultBit)
253253 pure True -- we count this as new coverage
254254 _ -> pure False
255255 _ -> pure False
@@ -287,7 +287,7 @@ execTxWithCov tx = do
287287 -- IO for making a new vec
288288 vec <- VMut. new size
289289 -- We use -1 for opIx to indicate that the location was not covered
290- forM_ [0 .. size- 1 ] $ \ i -> VMut. write vec i (- 1 , 0 , 0 , 0 )
290+ forM_ [0 .. size- 1 ] $ \ i -> VMut. write vec i (- 1 , 0 , 0 )
291291 pure $ Just vec
292292
293293 statsRef <- getTLS env. statsRef
@@ -310,12 +310,12 @@ execTxWithCov tx = do
310310 -- of `contract` for everything; it may be safe to remove this check.
311311 when (pc < VMut. length vec) $
312312 VMut. read vec pc >>= \ case
313- (_, depths, results, execQty ) | depth < 64 && not (depths `testBit` depth) -> do
314- VMut. write vec pc (opIx, depths `setBit` depth, results `setBit` fromEnum Stop , execQty + 1 )
315- VMut. modify (fromJust maybeStatsVec) (\ (execQty, revertQty) -> (execQty + 1 , revertQty)) pc
313+ (_, depths, results) | depth < 64 && not (depths `testBit` depth) -> do
314+ VMut. write vec pc (opIx, depths `setBit` depth, results `setBit` fromEnum Stop )
315+ VMut. modify (fromJust maybeStatsVec) (\ (execQty, revertQty) -> (execQty + 1 , revertQty)) opIx
316316 writeIORef covContextRef (True , Just (vec, pc))
317- (opIx', depths, results, execQty ) -> do
318- VMut. write vec pc (opIx', depths, results, execQty + 1 )
317+ (opIx', depths, results) -> do
318+ VMut. modify (fromJust maybeStatsVec) ( \ (execQty, revertQty) -> ( execQty + 1 , revertQty)) opIx'
319319 modifyIORef' covContextRef $ \ (new, _) -> (new, Just (vec, pc))
320320
321321 -- | Get the VM's current execution location
0 commit comments