From 580ab011345ea7548786563b939baf8a4da7a1f4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 21 Dec 2017 13:29:40 -0500 Subject: [PATCH] :memo: gc. --- src/Analysis/Abstract/Collecting.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Analysis/Abstract/Collecting.hs b/src/Analysis/Abstract/Collecting.hs index 118d3b0ed..56c970a40 100644 --- a/src/Analysis/Abstract/Collecting.hs +++ b/src/Analysis/Abstract/Collecting.hs @@ -26,6 +26,7 @@ evCollect ev0 ev' yield e = do modifyStore (gc (roots <> valueRoots v)) pure v +-- | Collect any addresses in the store not rooted in the given 'Live' set. gc :: (Ord (LocationFor a), Foldable (Cell (LocationFor a)), ValueRoots (LocationFor a) a) => Live (LocationFor a) a -> Store (LocationFor a) a -> Store (LocationFor a) a gc roots store = storeRestrict store (reachable roots store)