diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-08-20 11:17:05 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-08-20 11:17:05 +0200 |
commit | 965f8bf85d7850be074bad735d815b15a85a3de0 (patch) | |
tree | 915cb183c943c503c4b4a561679b7edc2e4a2938 /ReplaceRefs.hs | |
parent | 694ec05bcad01fd27606aace73b49cdade16945e (diff) |
Second
Diffstat (limited to 'ReplaceRefs.hs')
-rw-r--r-- | ReplaceRefs.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ReplaceRefs.hs b/ReplaceRefs.hs index 3ab73c3..821952b 100644 --- a/ReplaceRefs.hs +++ b/ReplaceRefs.hs @@ -1,15 +1,18 @@ module ReplaceRefs - (replaceRefsIns, replaceRefsTerm, replaceRefsBB, replaceRefsBBList) + (replaceRef, replaceRefsIns, replaceRefsTerm, replaceRefsBB, replaceRefsBBList) where import Intermediate +replaceRef :: Ref -> Ref -> Ref -> Ref +replaceRef = trans + replaceRefsIns :: Ref -> Ref -> IRIns -> IRIns replaceRefsIns from to (IMov a b) = IMov (trans from to a) (trans from to b) replaceRefsIns from to (IStore a b) = IStore (trans from to a) (trans from to b) replaceRefsIns from to (ILoad a b) = ILoad (trans from to a) (trans from to b) -replaceRefsIns from to (IAri at a b) = IAri at (trans from to a) (trans from to b) +replaceRefsIns from to (IAri at a b c) = IAri at (trans from to a) (trans from to b) (trans from to c) replaceRefsIns from to (ICall n al) = ICall n (map (trans from to) al) replaceRefsIns from to (ICallr a n al) = ICallr (trans from to a) n (map (trans from to) al) replaceRefsIns from to (IResize a b) = IResize (trans from to a) (trans from to b) |