]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TApply.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / TApply.java
index 88d80882e67312989f945ee6a81524b79418fcad..bd58949a6309918eb1ee0fce39425231c4056149 100644 (file)
@@ -218,6 +218,22 @@ public class TApply extends Type {
         return hash;
     }
     
+    @Override
+    public int skeletonHashCode(int hash) {
+        hash = HashCodeUtils.updateWithPreprocessedValue(hash, APPLY_HASH);
+        hash = function.skeletonHashCode(hash);
+        hash = parameter.skeletonHashCode(hash);
+        return hash;
+    }
+    
+    @Override
+    public int skeletonHashCode(int hash, TVar[] boundVars) {
+        hash = HashCodeUtils.updateWithPreprocessedValue(hash, APPLY_HASH);
+        hash = function.skeletonHashCode(hash, boundVars);
+        hash = parameter.skeletonHashCode(hash, boundVars);
+        return hash;
+    }
+    
     public Type getCanonicalFunction() {
         if(function instanceof TMetaVar)
             function = function.canonical();
@@ -240,4 +256,9 @@ public class TApply extends Type {
         return getCanonicalFunction().equalsCanonical(apply.getCanonicalFunction())
                 && getCanonicalParameter().equalsCanonical(apply.getCanonicalParameter());
     }
+    
+    @Override
+    public Type[] skeletonCanonicalChildren() {
+        return new Type[] {Skeletons.canonicalSkeleton(function), Skeletons.canonicalSkeleton(parameter)};
+    }
 }