anchor.diff:      if (arguments.length == 1 && op == '==') {
         final Constant right = arguments[0];
   
  -      // [DoubleConstant] uses [identical] to determine equality, so we need two
  -      // special cases:
  -      // Two NaNs are always unequal even if [identical] returns `true`.
  -      if (isNaN(receiver) || isNaN(right)) {
  -        return falseConstant;
  -      }
  -
  -      // Two zero values are always equal regardless of sign.
  -      if (isZero(receiver)) {
  -        return makeBoolConstant(isZero(right));
  -      }
  -
         if (receiver is NullConstant ||
             receiver is BoolConstant ||
             receiver is IntConstant ||
             receiver is DoubleConstant ||
             receiver is StringConstant ||
             right is NullConstant) {
  -        return makeBoolConstant(receiver == right);
  +        // [DoubleConstant] uses [identical] to determine equality, so we need
  +        // to take the special cases into account.
  +        return doubleSpecialCases(receiver, right) ??
  +            makeBoolConstant(receiver == right);
         } else {
           return report(
               node,
  
positive.code:         final Constant right = positionals[1];
  
          if (targetingJavaScript) {
            // In JavaScript, we lower [identical] to `===`, so any comparison
            // against NaN yields `false`.
            if (isNaN(left) || isNaN(right)) {
              return falseConstant;
            }
  
            // In JavaScript, `-0.0 === 0.0`.
            if (isZero(left)) {
              return makeBoolConstant(isZero(right));
            }
          }
  
          // Since we canonicalize constants during the evaluation, we can use
  
negative.code: 
    // Helper methods:
  
    /// If both constants are DoubleConstant whose values would give different
    /// results from == and [identical], return the result of ==. Otherwise
    /// return null.
    Constant doubleSpecialCases(Constant a, Constant b) {
      if (a is DoubleConstant && b is DoubleConstant) {
        if (a.value.isNaN && b.value.isNaN) return falseConstant;
        if (a.value == 0.0 && b.value == 0.0) return trueConstant;
      }
      return null;
    }
  
    bool hasPrimitiveEqual(Constant constant) {
      // TODO(askesc, fishythefish): Make sure the correct class is inferred
  