]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELambdaType.java
(refs #7375) Replaced collectEffects by CollectEffectsVisitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELambdaType.java
index 23733bac61165c31e178d2e960af9dcc92e38d3d..fec64d6d00ae477160d0dc87c028f5130edfc489 100644 (file)
@@ -9,11 +9,9 @@ import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.errors.Locations;
 import org.simantics.scl.compiler.internal.codegen.references.IVal;
 import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
-import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator;
 import org.simantics.scl.compiler.internal.interpreted.IExpression;
 import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
 import org.simantics.scl.compiler.types.TVar;
-import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
 
@@ -31,22 +29,18 @@ public class ELambdaType extends Expression {
         this.value = value;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        value.collectRefs(allRefs, refs);
+    @Override
+    public void collectVars(TObjectIntHashMap<Variable> allVars,
+            TIntHashSet vars) {
+        value.collectVars(allVars, vars);
+    }
+
+    @Override
+    protected void updateType() throws MatchException {
+        setType(Types.forAll(parameters, value.getType()));
     }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {
-           value.collectVars(allVars, vars);
-       }
-       
-       @Override
-       protected void updateType() throws MatchException {
-           setType(Types.forAll(parameters, value.getType()));
-       }
 
-       @Override
+    @Override
     public IVal toVal(CompilationContext context, CodeWriter w) {
         return lambdaToVal(context, w);
     }
@@ -93,16 +87,6 @@ public class ELambdaType extends Expression {
         throw new InternalCompilerError("Should not type check " + getClass().getSimpleName() + ".");
     }
     
-    @Override
-    public Expression decorate(ExpressionDecorator decorator) {
-        value = value.decorate(decorator);
-        return decorator.decorate(this);
-    }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-    }
-    
     @Override
     public void setLocationDeep(long loc) {
         if(location == Locations.NO_LOCATION) {
@@ -115,11 +99,6 @@ public class ELambdaType extends Expression {
     public void accept(ExpressionVisitor visitor) {
         visitor.visit(this);
     }
-
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-        value.forVariables(procedure);
-    }
     
     @Override
     public Expression accept(ExpressionTransformer transformer) {