Skip to content
Snippets Groups Projects
Commit b2c422f5 authored by Regis Blanc's avatar Regis Blanc
Browse files

while loops with distinguishable names

parent c9e103e4
Branches
Tags
No related merge requests found
...@@ -129,7 +129,7 @@ object ImperativeCodeElimination extends UnitPhase[Program] { ...@@ -129,7 +129,7 @@ object ImperativeCodeElimination extends UnitPhase[Program] {
(resId.toVariable, scope, scrutFun ++ modifiedVars.zip(freshIds).toMap) (resId.toVariable, scope, scrutFun ++ modifiedVars.zip(freshIds).toMap)
case wh@While(cond, body) => case wh@While(cond, body) =>
val whileFunDef = new FunDef(parent.id.freshen, Nil, Nil, UnitType).setPos(wh) val whileFunDef = new FunDef(parent.id.duplicate(name = (parent.id.name + "While")), Nil, Nil, UnitType).setPos(wh)
whileFunDef.addFlag(IsLoop(parent)) whileFunDef.addFlag(IsLoop(parent))
whileFunDef.body = Some( whileFunDef.body = Some(
IfExpr(cond, IfExpr(cond,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment