]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRQuery.java
(refs #7375) Fixed implementation of collectEffects
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / CHRQuery.java
index 70559d18f6f223543b4a99d9e7ba144ac9266c1e..c7ac33d889f208dade23dee4d78daee3d500b963 100644 (file)
@@ -9,14 +9,11 @@ import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.elaboration.expressions.Expression;
 import org.simantics.scl.compiler.elaboration.expressions.Variable;
-import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
 import org.simantics.scl.compiler.elaboration.expressions.printing.ExpressionToStringVisitor;
 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 CHRQuery extends Symbol {
@@ -31,11 +28,6 @@ public class CHRQuery extends Symbol {
             literal.resolve(context);
     }
 
-    public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        for(CHRLiteral literal : literals)
-            literal.collectRefs(allRefs, refs);
-    }
-
     public void checkType(TypingContext context) {
         for(CHRLiteral literal : literals)
             literal.checkType(context);
@@ -45,17 +37,7 @@ public class CHRQuery extends Symbol {
         for(CHRLiteral literal : literals)
             literal.collectVars(allVars, vars);
     }
-
-    public void forVariables(VariableProcedure procedure) {
-        for(CHRLiteral literal : literals)
-            literal.forVariables(procedure);
-    }
-
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        for(CHRLiteral literal : literals)
-            literal.collectFreeVariables(vars);
-    }
-
+    
     public void setLocationDeep(long loc) {
         if(location == Locations.NO_LOCATION) {
             this.location = loc;
@@ -96,14 +78,4 @@ public class CHRQuery extends Symbol {
         visitor.visit(this);
         return b.toString();
     }
-
-    public void collectQueryEffects(THashSet<Type> effects) {
-        for(CHRLiteral literal : literals)
-            literal.collectQueryEffects(effects);
-    }
-    
-    public void collectEnforceEffects(THashSet<Type> effects) {
-        for(CHRLiteral literal : literals)
-            literal.collectEnforceEffects(effects);
-    }
 }