void (@NotNull DfaMemoryState that) { DfaMemoryStateImpl other = (DfaMemoryStateImpl)that; assert other.isEphemeral() == isEphemeral(); assert other.myStack.size() == myStack.size(); ProgressManager.checkCanceled(); retainEquivalences(other); mergeDistinctPairs(other); mergeVariableTypes(other); mergeStacks(other); myCachedHash = null; myCachedNonTrivialEqClasses = null; afterMerge(other); }