[VM] Fix canonicalization of doubles: Two doubles are canonicalized to the same value if they are idencial()

Fixes https://github.com/dart-lang/sdk/issues/34730

Change-Id: I9f60c5f81ceb9bd31794efe20012a343dab748bb
Reviewed-on: https://dart-review.googlesource.com/c/78747
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index a427242..76cafc1 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -5109,8 +5109,7 @@
 
   int get hashCode => value.isNaN ? 199 : super.hashCode;
   bool operator ==(Object other) =>
-      other is DoubleConstant &&
-      (other.value == value || identical(value, other.value) /* For NaN */);
+      other is DoubleConstant && identical(value, other.value);
 
   DartType getType(TypeEnvironment types) => types.doubleType;
 }
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 7a96fa7..349ebbc 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -157,7 +157,6 @@
 
 [ $compiler == dartkp ]
 covariant_subtyping_test: RuntimeError
-double_literals/implicit_double_context_test: RuntimeError # Issue 34730
 generic_methods_generic_function_result_test/01: MissingCompileTimeError
 generic_no_such_method_dispatcher_test: RuntimeError # Issue 31424
 web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets