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%2FEConstant.java;h=1bab4ff646da38ab5c03c0327fd5cf6abe3b5cc3;hp=6b99e6d37f4ad320077cd91a4735103ff9e86b7b;hb=a8d72a172fdc815c8a9f0f584f010f7e35286f92;hpb=862c09c9608329f326404342d12da61792eece2c diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java index 6b99e6d37..1bab4ff64 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java @@ -17,7 +17,6 @@ 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.internal.interpreted.IConstant; import org.simantics.scl.compiler.internal.interpreted.IExpression; import org.simantics.scl.compiler.top.ExpressionInterpretationContext; @@ -36,7 +35,7 @@ import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.TIntHashSet; public class EConstant extends Expression { - SCLValue value; + public SCLValue value; Type[] typeParameters; public EConstant(SCLValue value, Type ... typeParameters) { @@ -84,23 +83,17 @@ public class EConstant extends Expression { return this; } - public void collectRefs(TObjectIntHashMap allRefs, TIntHashSet refs) { - int id = allRefs.get(value); - if(id >= 0) - refs.add(id); + @Override + public void collectVars(TObjectIntHashMap allVars, + TIntHashSet vars) { } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - } - public void toString(StringBuilder b, TypeUnparsingContext tuc) { - Name name = value.getName(); - if(name.module.equals("Builtin") || name.module.equals("Prelude")) - b.append(name.name); - else - b.append(name); + public void toString(StringBuilder b, TypeUnparsingContext tuc) { + Name name = value.getName(); + if(name.module.equals("Builtin") || name.module.equals("Prelude")) + b.append(name.name); + else + b.append(name); /*for(Type type : typeParameters) { b.append(" <"); b.append(type.toString(tuc)); @@ -234,19 +227,10 @@ public class EConstant extends Expression { else return applyPUnit(context); } - - @Override - public Expression decorate(ExpressionDecorator decorator) { - return decorator.decorate(this); - } @Override public boolean isEffectful() { - return false; - } - - @Override - public void collectEffects(THashSet effects) { + return false; } @Override @@ -264,10 +248,6 @@ public class EConstant extends Expression { public Precedence getPrecedence() { return value.getPrecedence(); } - - @Override - public void forVariables(VariableProcedure procedure) { - } @Override public boolean isPattern(int arity) {