]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Case.java
(refs #7375) Replaced collectVars method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / Case.java
index 54be27b3cc2de0e0d23170ecc0567d8498acf10f..a50bcc2ddf926b37b02b04f39dce0273088c721c 100644 (file)
@@ -8,10 +8,6 @@ import org.simantics.scl.compiler.errors.Locations;
 import org.simantics.scl.compiler.internal.parsing.Symbol;
 import org.simantics.scl.compiler.types.Type;
 
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
-
 public class Case extends Symbol {
     public Expression[] patterns;
     public Expression value;
@@ -35,21 +31,6 @@ public class Case extends Symbol {
         return lhs;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        value.collectRefs(allRefs, refs);
-    }
-
-    public void collectVars(TObjectIntHashMap<Variable> allVars,
-            TIntHashSet vars) {
-        value.collectVars(allVars, vars);
-    }
-
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        value.collectFreeVariables(vars);
-        for(int i=patterns.length-1;i>=0;--i)
-            patterns[i].removeFreeVariables(vars);
-    }
-
     public void resolve(TranslationContext context) {
         context.pushFrame();
         for(int i=0;i<patterns.length;++i)