]> 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 65b3f9b2f74b4e971808d6fe93c6384dfa437f7e..e6f57ac861ce2b0440400c90bbbdfdee82283b06 100644 (file)
@@ -10,14 +10,11 @@ import org.simantics.scl.compiler.elaboration.query.Query;
 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.internal.elaboration.utils.ExpressionDecorator;
 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 {
@@ -31,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) {
@@ -52,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) {
@@ -102,26 +83,10 @@ public class ETransformation extends SimplifiableExpression {
         }
     }
 
-    @Override
-    public Expression decorate(ExpressionDecorator decorator) {
-        return decorator.decorate(this);
-    }
-
-    @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) {