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%2FESelect.java;h=e7014a8657fb091d011ec0432626b55c73c606da;hb=HEAD;hp=42fdc6f106536465ad0350fbbd66c794392074ee;hpb=dcb08ba8db427e1e9951e61892c653c23977a8cc;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESelect.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESelect.java index 42fdc6f10..e7014a865 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESelect.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESelect.java @@ -26,18 +26,14 @@ import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.exceptions.MatchException; 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 ESelect extends SimplifiableExpression { private final Type ARRAY_LIST = Types.con("ArrayList", "T"); int selectVariant; - Expression expression; - Query query; - Variable[] variables; + public Expression expression; + public Query query; + public Variable[] variables; public ESelect(int selectVariant, Expression expression, Query query) { this.selectVariant = selectVariant; @@ -45,25 +41,6 @@ public class ESelect extends SimplifiableExpression { this.query = query; } - @Override - public void collectRefs(TObjectIntHashMap allRefs, - TIntHashSet refs) { - expression.collectRefs(allRefs, refs); - query.collectRefs(allRefs, refs); - } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - expression.collectVars(allVars, vars); - query.collectVars(allVars, vars); - } - - @Override - public void collectEffects(THashSet effects) { - throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support collectEffects."); - } - @Override protected void updateType() throws MatchException { setType(selectVariant==SCLTerminals.SELECT_FIRST @@ -140,14 +117,6 @@ public class ESelect extends SimplifiableExpression { return loc(location, result); } - @Override - public void collectFreeVariables(THashSet vars) { - expression.collectFreeVariables(vars); - query.collectFreeVariables(vars); - for(Variable variable : variables) - vars.remove(variable); - } - @Override public Expression resolve(TranslationContext context) { context.pushExistentialFrame();