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%2Felaboration%2Fexpressions%2FELet.java;h=811877aa0b618c6052933cfece5f05163ddff3d9;hp=7b7338a78e2f07efe17b4731a80b709c7635aa35;hb=91682baa9a8252390f09b80fd724f47e5957b234;hpb=80110419efddee4e5eaa0d6f3db4ba69602fb1f9 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java index 7b7338a78..811877aa0 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java @@ -21,7 +21,6 @@ import org.simantics.scl.compiler.types.exceptions.MatchException; import org.simantics.scl.compiler.types.kinds.Kinds; import gnu.trove.map.hash.TObjectIntHashMap; -import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.TIntHashSet; /** @@ -37,14 +36,6 @@ public class ELet extends Expression { this.in = in; } - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - for(Assignment assign : assignments) - assign.value.collectVars(allVars, vars); - in.collectVars(allVars, vars); - } - @Override protected void updateType() throws MatchException { setType(in.getType()); @@ -118,15 +109,6 @@ public class ELet extends Expression { return result; } - @Override - public void collectFreeVariables(THashSet vars) { - in.collectFreeVariables(vars); - for(Assignment assign : assignments) - assign.value.collectFreeVariables(vars); - for(Assignment assign : assignments) - assign.pattern.removeFreeVariables(vars); - } - @Override public Expression resolve(TranslationContext context) { throw new InternalCompilerError("ELet should be already resolved."); @@ -172,7 +154,7 @@ public class ELet extends Expression { IVal[] parameters = newW.getParameters(); for(int j=0;j effects) { - for(Assignment assignment : assignments) { - assignment.pattern.collectEffects(effects); - assignment.value.collectEffects(effects); - } - in.collectEffects(effects); - } @Override public void setLocationDeep(long loc) {