1 package org.simantics.scl.compiler.internal.types;
3 import gnu.trove.map.hash.TObjectIntHashMap;
5 import org.simantics.scl.compiler.types.TVar;
7 public class TypeHashCodeContext {
9 public static final int APPLY = 0x12345678;
10 public static final int FORALL = 0xf2341233;
11 public static final int UNION = 0x9f8f7f6f;
12 public static final int FUN = 0xff294313;
15 TObjectIntHashMap<TVar> varHashCode;
17 public void append(int hash) {
18 result = result*31 + hash;
21 public int getResult() {
25 public TObjectIntHashMap<TVar> getVarHashCode() {
29 public TObjectIntHashMap<TVar> createVarHashCode() {
30 if(varHashCode == null)
31 varHashCode = new TObjectIntHashMap<TVar>();