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

while loops with distinguishable names

parent 508c8049
No related branches found
No related tags found
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