]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESimpleLet.java
(refs #7375) Replaced collectEffects by CollectEffectsVisitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ESimpleLet.java
index e8fd9cf940b1b3f41dfa34cfc6cf800de3c887e9..e69a271218a82b620230be5c9d2a131f396e6702 100644 (file)
@@ -8,7 +8,6 @@ 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.internal.interpreted.ILet;
 import org.simantics.scl.compiler.internal.interpreted.ISeq;
@@ -46,28 +45,23 @@ public class ESimpleLet extends Expression {
         this.in = in;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        value.collectRefs(allRefs, refs);
-        in.collectRefs(allRefs, refs);
-    }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {
-           value.collectVars(allVars, vars);
-           in.collectVars(allVars, vars);
-       }
+    @Override
+    public void collectVars(TObjectIntHashMap<Variable> allVars,
+            TIntHashSet vars) {
+        value.collectVars(allVars, vars);
+        in.collectVars(allVars, vars);
+    }
 
     @Override
     protected void updateType() throws MatchException {
         setType(in.getType());
     }
-    
-       @Override
-       public IVal toVal(CompilationContext context, CodeWriter w) {
-           IVal valueVal = value.toVal(context, w);
-           if(variable != null)
-               variable.setVal(valueVal);
+
+    @Override
+    public IVal toVal(CompilationContext context, CodeWriter w) {
+        IVal valueVal = value.toVal(context, w);
+        if(variable != null)
+            variable.setVal(valueVal);
         return in.toVal(context, w);
     }
 
@@ -175,19 +169,6 @@ public class ESimpleLet extends Expression {
         in = in.checkIgnoredType(context);
         return this;
     }
-
-    @Override
-    public Expression decorate(ExpressionDecorator decorator) {
-        value = value.decorate(decorator);
-        in = in.decorate(decorator);
-        return decorator.decorate(this);
-    }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-        value.collectEffects(effects);
-        in.collectEffects(effects);
-    }
     
     @Override
     public void accept(ExpressionVisitor visitor) {
@@ -206,12 +187,6 @@ public class ESimpleLet extends Expression {
         return in;
     }
 
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-        value.forVariables(procedure);
-        in.forVariables(procedure);
-    }
-    
     @Override
     public Expression accept(ExpressionTransformer transformer) {
         return transformer.transform(this);