136 |
goto (out, !succ)) |
goto (out, !succ)) |
137 |
| IR.COND{cond, trueBranch, falseBranch, ...} => ( |
| IR.COND{cond, trueBranch, falseBranch, ...} => ( |
138 |
prln (out1, [ |
prln (out1, [ |
139 |
"if ", Var.toString cond, |
"if ", Var.toString (!cond), |
140 |
" then goto ", IR.Node.toString(!trueBranch), |
" then goto ", IR.Node.toString(!trueBranch), |
141 |
" else goto ", IR.Node.toString(!falseBranch), "\n" |
" else goto ", IR.Node.toString(!falseBranch), "\n" |
142 |
]); |
]); |
144 |
ppNd (out, false, !falseBranch)) |
ppNd (out, false, !falseBranch)) |
145 |
| IR.FOREACH{phis, var, src, bodyEntry, succ, ...} => ( |
| IR.FOREACH{phis, var, src, bodyEntry, succ, ...} => ( |
146 |
prln (out1, [ |
prln (out1, [ |
147 |
"foreach (", Var.toString var, " in ", Var.toString src, ")", |
"foreach (", Var.toString var, " in ", Var.toString (!src), ")", |
148 |
" on exit goto ", IR.Node.toString(!succ), "\n" |
" on exit goto ", IR.Node.toString(!succ), "\n" |
149 |
]); |
]); |
150 |
List.app (prPhi (incIndent out1)) (!phis); |
List.app (prPhi (incIndent out1)) (!phis); |