Commit 6ee6828e authored by Sapphie's avatar Sapphie
Browse files

Implement sub primitive

parent 284fa4ce
......@@ -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))
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment