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

Unified Diff: runtime/lib/double.cc

Issue 266723012: Move the double isNegative test back to double.cc as it seems to cause some compile issues when it … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.cc
===================================================================
--- runtime/lib/double.cc (revision 35690)
+++ runtime/lib/double.cc (working copy)
@@ -271,7 +271,8 @@
DEFINE_NATIVE_ENTRY(Double_getIsNegative, 1) {
const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
// Include negative zero, infinity.
- return Bool::Get(arg.IsNegative()).raw();
+ double dval = arg.value();
+ return Bool::Get(signbit(dval) && !isnan(dval)).raw();
}
// Add here only functions using/referring to old-style casts.
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698