]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETransformation.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ETransformation.java
index e00514151f335c6772b6c761da66a51a4dbecefb..e6f57ac861ce2b0440400c90bbbdfdee82283b06 100644 (file)
@@ -11,12 +11,10 @@ import org.simantics.scl.compiler.elaboration.rules.TransformationRule;
 import org.simantics.scl.compiler.errors.Locations;
 import org.simantics.scl.compiler.internal.elaboration.transformations.TransformationBuilder;
 import org.simantics.scl.compiler.top.SCLCompilerConfiguration;
-import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
 
 import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
 import gnu.trove.set.hash.TIntHashSet;
 
 public class ETransformation extends SimplifiableExpression {
@@ -30,17 +28,6 @@ public class ETransformation extends SimplifiableExpression {
         this.seed = seed;
     }
 
-    @Override
-    public void collectRefs(TObjectIntHashMap<Object> allRefs,
-            TIntHashSet refs) {
-        {
-            int ref = allRefs.get(TRANSFORMATION_RULES_TYPECHECKED);
-            if(ref >= 0)
-                refs.add(ref);
-        }
-        seed.collectRefs(allRefs, refs);
-    }
-
     @Override
     public void collectVars(TObjectIntHashMap<Variable> allVars,
             TIntHashSet vars) {
@@ -51,11 +38,6 @@ public class ETransformation extends SimplifiableExpression {
     protected void updateType() throws MatchException {
         setType(Types.UNIT);
     }
-
-    @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        seed.collectFreeVariables(vars);
-    }
     
     @Override
     public Expression inferType(TypingContext context) {
@@ -101,21 +83,10 @@ public class ETransformation extends SimplifiableExpression {
         }
     }
 
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-        effects.add(Types.PROC);
-        //seed.collectEffects(Query.RW, effects); // FIXME
-    }
-
     @Override
     public void accept(ExpressionVisitor visitor) {
         visitor.visit(this);
     }
-
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-        seed.forVariables(procedure);
-    }
     
     @Override
     public Expression accept(ExpressionTransformer transformer) {