code: private static TernaryValue tryAbstractEqualityComparison(Node left, Node right) {
      // Evaluate based on the general type.
      ValueType leftValueType = NodeUtil.getKnownValueType(left);
      ValueType rightValueType = NodeUtil.getKnownValueType(right);
      if (leftValueType != ValueType.UNDETERMINED && rightValueType != ValueType.UNDETERMINED) {
        // Delegate to strict equality comparison for values of the same type.
        if (leftValueType == rightValueType) {
          return tryStrictEqualityComparison(left, right);
        }
        if ((leftValueType == ValueType.NULL && rightValueType == ValueType.VOID)
            || (leftValueType == ValueType.VOID && rightValueType == ValueType.NULL)) {
          return TernaryValue.TRUE;
        }
        if ((leftValueType == ValueType.NUMBER && rightValueType == ValueType.STRING)
            || rightValueType == ValueType.BOOLEAN) {
          Double rv = NodeUtil.getNumberValue(right);
          return rv == null
              ? TernaryValue.UNKNOWN
              : tryAbstractEqualityComparison(left, IR.number(rv));
        }
        if ((leftValueType == ValueType.STRING && rightValueType == ValueType.NUMBER)
            || leftValueType == ValueType.BOOLEAN) {
          Double lv = NodeUtil.getNumberValue(left);
          return lv == null
              ? TernaryValue.UNKNOWN
              : tryAbstractEqualityComparison(IR.number(lv), right);
        }
        if ((leftValueType == ValueType.STRING || leftValueType == ValueType.NUMBER)
            && rightValueType == ValueType.OBJECT) {
          return TernaryValue.UNKNOWN;
        }
        if (leftValueType == ValueType.OBJECT
            && (rightValueType == ValueType.STRING || rightValueType == ValueType.NUMBER)) {
          return TernaryValue.UNKNOWN;
        }
        return TernaryValue.FALSE;
      }
      // In general, the rest of the cases cannot be folded.
      return TernaryValue.UNKNOWN;
    }
docs: http://www.ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison