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%2Ftypes%2FTApply.java;h=bd58949a6309918eb1ee0fce39425231c4056149;hp=88d80882e67312989f945ee6a81524b79418fcad;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TApply.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TApply.java index 88d80882e..bd58949a6 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TApply.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TApply.java @@ -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)}; + } }