anchor.diff:          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));
  -          }
  +          // In JavaScript, we lower [identical] to `===`, so we need to take
  +          // the double special cases into account.
  +          return doubleSpecialCases(left, right) ??
  +              makeBoolConstant(identical(left, right));
           }
   
           // Since we canonicalize constants during the evaluation, we can use
  
positive.code: 
    // Helper methods:
  
    bool isZero(Constant value) =>
        (value is IntConstant && value.value == 0) ||
        (value is JavaScriptIntConstant && value.bigIntValue == BigInt.zero) ||
        (value is DoubleConstant && value.value == 0);
  
    bool isNaN(Constant value) => value is DoubleConstant && value.value.isNaN;
  
    bool hasPrimitiveEqual(Constant constant) {
      // TODO(askesc, fishythefish): Make sure the correct class is inferred
  
negative.code:     if (arguments.length == 1 && op == '==') {
        final Constant right = arguments[0];
  
        if (receiver is NullConstant ||
            receiver is BoolConstant ||
            receiver is IntConstant ||
            receiver is DoubleConstant ||
            receiver is StringConstant ||
            right is NullConstant) {
          // [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,
  