]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRLiteral.java
(refs #7375) Fixed implementation of collectEffects
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / CHRLiteral.java
index 918dd9fb309ef25d4d9dfd3f156e60b7d4b097e5..eb0f48b20414aa35baa74b4bd0fe743f35a7ba8a 100644 (file)
@@ -12,7 +12,6 @@ import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.elaboration.expressions.ERecord;
 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.elaboration.expressions.records.FieldAssignment;
 import org.simantics.scl.compiler.elaboration.relations.SCLRelation;
@@ -24,7 +23,6 @@ import org.simantics.scl.compiler.types.Types;
 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;
 
 public class CHRLiteral extends Symbol {
@@ -113,14 +111,6 @@ public class CHRLiteral extends Symbol {
         }
     }
 
-    public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        for(Expression parameter : parameters)
-            parameter.collectRefs(allRefs, refs);
-        if(typeConstraintEvidenceParameters != null)
-            for(Expression parameter : typeConstraintEvidenceParameters)
-                parameter.collectRefs(allRefs, refs);
-    }
-
     public void checkType(TypingContext context) {
         if(relation == SpecialCHRRelation.EXECUTE) {
             if(parameters.length != 1)
@@ -157,27 +147,6 @@ public class CHRLiteral extends Symbol {
                 parameter.collectVars(allVars, vars);
     }
 
-    public void forVariables(VariableProcedure procedure) {
-        for(Expression parameter : parameters)
-            parameter.forVariables(procedure);
-        if(typeConstraintEvidenceParameters != null)
-            for(Expression parameter : typeConstraintEvidenceParameters)
-                parameter.forVariables(procedure);
-    }
-
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        if(relation == SpecialCHRRelation.ASSIGN) {
-            parameters[1].collectFreeVariables(vars);
-        }
-        else {
-            for(Expression parameter : parameters)
-                parameter.collectFreeVariables(vars);
-            if(typeConstraintEvidenceParameters != null)
-                for(Expression parameter : typeConstraintEvidenceParameters)
-                    parameter.collectFreeVariables(vars);
-        }
-    }
-
     public void setLocationDeep(long loc) {
         if(location == Locations.NO_LOCATION) {
             this.location = loc;
@@ -200,12 +169,4 @@ public class CHRLiteral extends Symbol {
         visitor.visit(this);
         return b.toString();
     }
-
-    public void collectQueryEffects(THashSet<Type> effects) {
-        // TODO
-    }
-
-    public void collectEnforceEffects(THashSet<Type> effects) {
-        // TODO
-    }
 }