public static IsNullValue merge ( IsNullValue a , IsNullValue b ) { if ( a == b ) { return a ; } if ( a . equals ( b ) ) { return a ; } int aKind = a . kind & 0xff ; int bKind = b . kind & 0xff ; int aFlags = a . getFlags ( ) ; int bFlags = b . getFlags ( ) ; int combinedFlags = aFlags & bFlags ; if ( ! ( a . isNullOnSomePath ( ) || a . isDefinitelyNull ( ) ) && b . isException ( ) ) { combinedFlags |= EXCEPTION ; } else if ( ! ( b . isNullOnSomePath ( ) || b . isDefinitelyNull ( ) ) && a . isException ( ) ) { combinedFlags |= EXCEPTION ; } // Left hand value should be >=, since it is used // as the first dimension of the matrix to index. if ( aKind < bKind ) { int tmp = aKind ; aKind = bKind ; bKind = tmp ; } assert aKind >= bKind ; int result = mergeMatrix [ aKind ] [ bKind ] ; IsNullValue resultValue = ( result == NO_KABOOM_NN ) ? noKaboomNonNullValue ( a . locationOfKaBoom ) : instanceByFlagsList [ combinedFlags >> FLAG_SHIFT ] [ result ] ; return resultValue ; }
Merge two values .