summaryrefslogtreecommitdiff
path: root/Intermediate.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-11-26 22:11:28 +0100
committertomsmeding <tom.smeding@gmail.com>2019-12-13 15:06:58 +0100
commitf9bcf22542b30b75c73cc9d45a91561998b083dc (patch)
tree7fd063314525243ea2d8edf0185d472807d3ca1d /Intermediate.hs
parenta436e9d7c7c4115ecc397b4b103573e75aa6c8bc (diff)
Use IOArray for TempMap in VM
Diffstat (limited to 'Intermediate.hs')
-rw-r--r--Intermediate.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Intermediate.hs b/Intermediate.hs
index a020509..efa0e40 100644
--- a/Intermediate.hs
+++ b/Intermediate.hs
@@ -64,6 +64,9 @@ termOf (BB _ _ t) = t
class AllRefs a where
allRefs :: a -> [Ref]
+instance AllRefs IRProgram where
+ allRefs (IRProgram bbs _ _) = allRefs bbs
+
instance AllRefs BB where
allRefs (BB _ inss term) =
sortUniq $ concatMap (allRefs . snd) inss ++ allRefs term