Skip to content
Snippets Groups Projects
Commit 6ee6828e authored by Sapphie's avatar Sapphie
Browse files

Implement sub primitive

parent 284fa4ce
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,10 @@ object CPSValueRepresenter extends (H.Tree => L.Tree) {
tempLetP(CPS.Sub, Seq(Left(x), Right(1))) { x1 =>
L.LetP(n, CPS.Add, Seq(x1, rewrite(y)), apply(body))
}
case H.LetP(n, L3.IntSub, Seq(x, y), body) =>
tempLetP(CPS.Add, Seq(Left(x), Right(1))) { x1 =>
L.LetP(n, CPS.Sub, Seq(x1, rewrite(y)), apply(body))
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment