Revision: 15872
Author:   [email protected]
Date:     Thu Jul 25 01:49:52 2013
Log:      Don't duplicate ceiling() for every POSIX platform.

[email protected]

Review URL: https://codereview.chromium.org/20274002
http://code.google.com/p/v8/source/detail?r=15872

Modified:
 /branches/bleeding_edge/src/platform-cygwin.cc
 /branches/bleeding_edge/src/platform-freebsd.cc
 /branches/bleeding_edge/src/platform-linux.cc
 /branches/bleeding_edge/src/platform-macos.cc
 /branches/bleeding_edge/src/platform-openbsd.cc
 /branches/bleeding_edge/src/platform-posix.cc
 /branches/bleeding_edge/src/platform-solaris.cc

=======================================
--- /branches/bleeding_edge/src/platform-cygwin.cc      Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-cygwin.cc      Thu Jul 25 01:49:52 2013
@@ -52,11 +52,6 @@
 namespace internal {


-double ceiling(double x) {
-  return ceil(x);
-}
-
-
 static Mutex* limit_mutex = NULL;


=======================================
--- /branches/bleeding_edge/src/platform-freebsd.cc     Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-freebsd.cc     Thu Jul 25 01:49:52 2013
@@ -63,16 +63,6 @@
 namespace internal {


-double ceiling(double x) {
-    // Correct as on OS X
-    if (-1.0 < x && x < 0.0) {
-        return -0.0;
-    } else {
-        return ceil(x);
-    }
-}
-
-
 static Mutex* limit_mutex = NULL;


=======================================
--- /branches/bleeding_edge/src/platform-linux.cc       Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-linux.cc       Thu Jul 25 01:49:52 2013
@@ -76,11 +76,6 @@
 namespace internal {


-double ceiling(double x) {
-  return ceil(x);
-}
-
-
 static Mutex* limit_mutex = NULL;


=======================================
--- /branches/bleeding_edge/src/platform-macos.cc       Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-macos.cc       Thu Jul 25 01:49:52 2013
@@ -79,16 +79,6 @@
 namespace internal {


-double ceiling(double x) {
-  // Correct Mac OS X Leopard 'ceil' behavior.
-  if (-1.0 < x && x < 0.0) {
-    return -0.0;
-  } else {
-    return ceil(x);
-  }
-}
-
-
 static Mutex* limit_mutex = NULL;


=======================================
--- /branches/bleeding_edge/src/platform-openbsd.cc     Thu Jul 25 01:04:45 2013
+++ /branches/bleeding_edge/src/platform-openbsd.cc     Thu Jul 25 01:49:52 2013
@@ -61,11 +61,6 @@
 namespace internal {


-double ceiling(double x) {
-  return ceil(x);
-}
-
-
 static Mutex* limit_mutex = NULL;


=======================================
--- /branches/bleeding_edge/src/platform-posix.cc       Thu Jul 25 01:06:13 2013
+++ /branches/bleeding_edge/src/platform-posix.cc       Thu Jul 25 01:49:52 2013
@@ -225,6 +225,12 @@
// ----------------------------------------------------------------------------
 // Math functions

+double ceiling(double x) {
+  // Correct buggy 'ceil' on some systems (i.e. FreeBSD, OS X 10.5)
+  return (-1.0 < x && x < 0.0) ? -0.0 : ceil(x);
+}
+
+
 double modulo(double x, double y) {
   return fmod(x, y);
 }
=======================================
--- /branches/bleeding_edge/src/platform-solaris.cc     Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-solaris.cc     Thu Jul 25 01:49:52 2013
@@ -81,11 +81,6 @@
 namespace internal {


-double ceiling(double x) {
-  return ceil(x);
-}
-
-
 static Mutex* limit_mutex = NULL;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to