]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELet.java
index 5bde43500f6d7c3ab2c07b41c9d61bbf316de801..71195352405ecf2c2ce35ba5010bd5e814982162 100644 (file)
@@ -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;
 
 /**
@@ -36,13 +35,6 @@ public class ELet extends Expression {
         this.assignments = assignments;
         this.in = in;
     }
-
-    @Override
-    public void collectRefs(final TObjectIntHashMap<Object> allRefs, final TIntHashSet refs) {
-        for(Assignment assign : assignments)
-            assign.value.collectRefs(allRefs, refs);
-        in.collectRefs(allRefs, refs);
-    }
     
     @Override
     public void collectVars(TObjectIntHashMap<Variable> allVars,
@@ -125,15 +117,6 @@ public class ELet extends Expression {
         return result;
     }
 
-    @Override
-    public void collectFreeVariables(THashSet<Variable> 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.");
@@ -211,15 +194,6 @@ public class ELet extends Expression {
         in = in.checkIgnoredType(context);
         return this;
     }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-        for(Assignment assignment : assignments) {
-            assignment.pattern.collectEffects(effects);
-            assignment.value.collectEffects(effects);
-        }
-        in.collectEffects(effects);
-    }
     
     @Override
     public void setLocationDeep(long loc) {