X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FEAsPattern.java;h=21248179f9a7711732edf31c359c41d799f1b8fb;hp=1a4a5bbd04c3e2c8091a8f01c4b4d2063edc647c;hb=666ee533a3cfa9f59e79215a269f8342227cdbda;hpb=dcb08ba8db427e1e9951e61892c653c23977a8cc diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EAsPattern.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EAsPattern.java index 1a4a5bbd0..21248179f 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EAsPattern.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EAsPattern.java @@ -12,10 +12,6 @@ import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter; import org.simantics.scl.compiler.types.Type; 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 EAsPattern extends Expression { public Variable var; @@ -39,32 +35,6 @@ public class EAsPattern extends Expression { public Expression getPattern() { return pattern; } - - @Override - public void collectRefs(TObjectIntHashMap allRefs, - TIntHashSet refs) { - pattern.collectRefs(allRefs, refs); - } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - int id = allVars.get(var); - if(id >= 0) - vars.add(id); - pattern.collectVars(allVars, vars); - } - - @Override - public void collectFreeVariables(THashSet vars) { - throw new InternalCompilerError(location, "Cannot collect free variables for a pattern."); - } - - @Override - public void removeFreeVariables(THashSet vars) { - vars.remove(var); - pattern.removeFreeVariables(vars); - } @Override public Expression simplify(SimplificationContext context) { @@ -123,11 +93,6 @@ public class EAsPattern extends Expression { return result; } - - @Override - public void collectEffects(THashSet effects) { - pattern.collectEffects(effects); - } @Override public void setLocationDeep(long loc) {