]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/query/pre/PreQuery.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / query / pre / PreQuery.java
index ee96433d3e11e35c7e98370916de82f6b3c0d7f8..b7b9f964bec4dd70320903f103722804791c3834 100644 (file)
@@ -6,7 +6,6 @@ import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
 import org.simantics.scl.compiler.elaboration.contexts.ReplaceContext;
 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.elaboration.expressions.Variable;
-import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
 import org.simantics.scl.compiler.elaboration.query.QConjunction;
 import org.simantics.scl.compiler.elaboration.query.QExists;
 import org.simantics.scl.compiler.elaboration.query.Query;
@@ -14,7 +13,6 @@ import org.simantics.scl.compiler.elaboration.query.QueryVisitor;
 import org.simantics.scl.compiler.elaboration.query.compilation.ConstraintCollectionContext;
 
 import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
 import gnu.trove.set.hash.TIntHashSet;
 
 /**
@@ -24,11 +22,6 @@ public abstract class PreQuery extends Query {
 
     public ArrayList<Variable> extraVariables = new ArrayList<Variable>(2);
     public ArrayList<Query> sideQueries = new ArrayList<Query>(2);
-        
-    @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support collectFreeVariables.");
-    }
     
     @Override
     public void checkType(TypingContext context) {
@@ -40,12 +33,6 @@ public abstract class PreQuery extends Query {
         throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support collectConstraints.");
     }
     
-    @Override
-    public void collectRefs(TObjectIntHashMap<Object> allRefs,
-            TIntHashSet refs) {
-        throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support collectRefs.");
-    }
-    
     @Override
     public void collectVars(TObjectIntHashMap<Variable> allVars,
             TIntHashSet vars) {
@@ -71,9 +58,4 @@ public abstract class PreQuery extends Query {
             query = new QExists(extraVariables.toArray(new Variable[extraVariables.size()]), query);
         return query;
     }
-    
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-        throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support forVariables.");
-    }
 }