import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.elaboration.transformations.TransformationBuilder;
import org.simantics.scl.compiler.top.SCLCompilerConfiguration;
-import org.simantics.scl.compiler.types.Type;
import org.simantics.scl.compiler.types.Types;
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 ETransformation extends SimplifiableExpression {
public static final Object TRANSFORMATION_RULES_TYPECHECKED = new Object();
this.seed = seed;
}
- @Override
- public void collectRefs(TObjectIntHashMap<Object> allRefs,
- TIntHashSet refs) {
- {
- int ref = allRefs.get(TRANSFORMATION_RULES_TYPECHECKED);
- if(ref >= 0)
- refs.add(ref);
- }
- seed.collectRefs(allRefs, refs);
- }
-
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars,
- TIntHashSet vars) {
- seed.collectVars(allVars, vars);
- }
-
@Override
protected void updateType() throws MatchException {
setType(Types.UNIT);
}
-
- @Override
- public void collectFreeVariables(THashSet<Variable> vars) {
- seed.collectFreeVariables(vars);
- }
@Override
public Expression inferType(TypingContext context) {
}
}
- @Override
- public void collectEffects(THashSet<Type> effects) {
- effects.add(Types.PROC);
- //seed.collectEffects(Query.RW, effects); // FIXME
- }
-
@Override
public void accept(ExpressionVisitor visitor) {
visitor.visit(this);