]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java
(refs #7375) Replaced collectEffects by CollectEffectsVisitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EConstant.java
index 037144a4c63d20f15157410640c1e1a313ddea8d..1bab4ff646da38ab5c03c0327fd5cf6abe3b5cc3 100644 (file)
@@ -35,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) {
@@ -83,23 +83,17 @@ public class EConstant extends Expression {
         return this;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        int id = allRefs.get(value);
-        if(id >= 0)
-            refs.add(id);
+    @Override
+    public void collectVars(TObjectIntHashMap<Variable> allVars,
+            TIntHashSet vars) {   
     }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> 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));
@@ -236,11 +230,7 @@ public class EConstant extends Expression {
     
     @Override
     public boolean isEffectful() {
-       return false;
-    }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
+        return false;
     }
     
     @Override