X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FEBind.java;h=5c4a729e2e15fb748a7a17e7793c48d4257e196b;hb=fe1a2f532761669e67da4db4ae15096ced8a04db;hp=d950e7b738eb07124ae4e6549437c7b9ffb7dfb1;hpb=862c09c9608329f326404342d12da61792eece2c;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java index d950e7b73..5c4a729e2 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java @@ -9,22 +9,17 @@ import org.simantics.scl.compiler.elaboration.modules.SCLValue; 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.types.Type; import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.exceptions.MatchException; import org.simantics.scl.compiler.types.exceptions.UnificationException; import org.simantics.scl.compiler.types.kinds.Kinds; -import gnu.trove.map.hash.TObjectIntHashMap; -import gnu.trove.set.hash.THashSet; -import gnu.trove.set.hash.TIntHashSet; - public class EBind extends SimplifiableExpression { public Expression pattern; public Expression value; public Expression in; - private EVariable monadEvidence; + public EVariable monadEvidence; SCLValue bindFunction; Type monadType; Type valueContentType; @@ -44,19 +39,6 @@ public class EBind extends SimplifiableExpression { this.value = value; this.in = in; } - - @Override - public void collectRefs(final TObjectIntHashMap allRefs, final TIntHashSet refs) { - value.collectRefs(allRefs, refs); - in.collectRefs(allRefs, refs); - } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - value.collectVars(allVars, vars); - in.collectVars(allVars, vars); - } @Override protected void updateType() throws MatchException { @@ -117,13 +99,6 @@ public class EBind extends SimplifiableExpression { return simplified.simplify(context); } - @Override - public void collectFreeVariables(THashSet vars) { - in.collectFreeVariables(vars); - value.collectFreeVariables(vars); - pattern.removeFreeVariables(vars); - } - @Override public Expression resolve(TranslationContext context) { value = value.resolve(context); @@ -138,21 +113,6 @@ public class EBind extends SimplifiableExpression { return this; } - @Override - public Expression decorate(ExpressionDecorator decorator) { - pattern = pattern.decorate(decorator); - value = value.decorate(decorator); - in = in.decorate(decorator); - return decorator.decorate(this); - } - - @Override - public void collectEffects(THashSet effects) { - pattern.collectEffects(effects); - value.collectEffects(effects); - in.collectEffects(effects); - } - @Override public void setLocationDeep(long loc) { if(location == Locations.NO_LOCATION) { @@ -167,14 +127,6 @@ public class EBind extends SimplifiableExpression { public void accept(ExpressionVisitor visitor) { visitor.visit(this); } - - @Override - public void forVariables(VariableProcedure procedure) { - pattern.forVariables(procedure); - value.forVariables(procedure); - if(monadEvidence != null) - monadEvidence.forVariables(procedure); - } @Override public Expression accept(ExpressionTransformer transformer) {