Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: runtime/vm/object.cc

Issue 317643004: Unify handling of identical(NaN, NaN) between generated code and Dart API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object_test.cc » ('j') | runtime/vm/object_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 37108)
+++ runtime/vm/object.cc (working copy)
@@ -13048,13 +13048,7 @@
return Integer::Cast(*this).Equals(other);
}
if (IsDouble() && other.IsDouble()) {
- if (Double::Cast(*this).CanonicalizeEquals(other)) return true;
- // Check for NaN.
- const Double& a_double = Double::Cast(*this);
- const Double& b_double = Double::Cast(other);
- if (isnan(a_double.value()) && isnan(b_double.value())) {
- return true;
- }
+ return Double::Cast(*this).CanonicalizeEquals(other);
}
return false;
}
« no previous file with comments | « no previous file | runtime/vm/object_test.cc » ('j') | runtime/vm/object_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698