X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fcodegen%2Fssa%2Fstatements%2FLetFunctions.java;h=dc6a8580d713cc8c579ef1cbdfb45aad24dd34ea;hp=cf46899f645b48b2b516c5a895c56b25cb566390;hb=7e3061cfff1ac4f100fd671feccea25841222cb0;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/statements/LetFunctions.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/statements/LetFunctions.java index cf46899f6..dc6a8580d 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/statements/LetFunctions.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/statements/LetFunctions.java @@ -164,6 +164,7 @@ public class LetFunctions extends SSAStatement implements ClosureBinder { BoundVar newVar = varMap.get(var); if(newVar == null) { newVar = new BoundVar(var.getType()); + newVar.setLabel(var.getLabel()); oldVarsList.add(var); newVarsList.add(newVar); varMap.put(var, newVar); @@ -211,7 +212,7 @@ public class LetFunctions extends SSAStatement implements ClosureBinder { inVarsMap.put(closure, inVars); varMap.put(closure, map); - closure.parametrize(inVars); + closure.parametrize(inVars); SCLConstant functionConstant = new SCLConstant(context.createName(), closure.getType()); context.addConstant(functionConstant); oldTargets.put(closure, (BoundVar)closure.getTarget()); @@ -274,4 +275,10 @@ public class LetFunctions extends SSAStatement implements ClosureBinder { for(SSAClosure closure = firstClosure; closure != null; closure = closure.getNext()) closure.forValRefs(visitor); } + + @Override + public void cleanup() { + for(SSAClosure closure = firstClosure; closure != null; closure = closure.getNext()) + closure.cleanup(); + } }