private static int hashCodeOf(int reg, TypeBearer type, LocalItem local) {
    int hash = (local != null) ? local.hashCode() : 0;

    hash = (hash * 31 + type.hashCode()) * 31 + reg;
    return hash;
  }
Helper for {@link #hashCode} and {@link
ForComparison#hashCode}, which actually does the
calculation.

@param reg value of the instance variable
@param type value of the instance variable
@param local value of the instance variable
@return the hash code
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpec.java