Revision: 3405 Author: [email protected] Date: Thu Dec 3 01:29:21 2009 Log: Move function nan_value to POSIX platform file
Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it. Review URL: http://codereview.chromium.org/464015 http://code.google.com/p/v8/source/detail?r=3405 Modified: /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-freebsd.cc Fri Nov 13 04:32:57 2009 +++ /branches/bleeding_edge/src/platform-freebsd.cc Thu Dec 3 01:29:21 2009 @@ -87,11 +87,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { return 0; // FreeBSD runs on anything. } - - -double OS::nan_value() { - return NAN; -} int OS::ActivationFrameAlignment() { ======================================= --- /branches/bleeding_edge/src/platform-linux.cc Fri Nov 13 04:32:57 2009 +++ /branches/bleeding_edge/src/platform-linux.cc Thu Dec 3 01:29:21 2009 @@ -93,11 +93,6 @@ return 0; // Linux runs on anything. #endif } - - -double OS::nan_value() { - return NAN; -} #ifdef __arm__ ======================================= --- /branches/bleeding_edge/src/platform-macos.cc Fri Nov 13 04:32:57 2009 +++ /branches/bleeding_edge/src/platform-macos.cc Thu Dec 3 01:29:21 2009 @@ -250,11 +250,6 @@ const uint64_t one = 1; return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID); } - - -double OS::nan_value() { - return NAN; -} int OS::ActivationFrameAlignment() { ======================================= --- /branches/bleeding_edge/src/platform-openbsd.cc Thu Dec 3 00:23:10 2009 +++ /branches/bleeding_edge/src/platform-openbsd.cc Thu Dec 3 01:29:21 2009 @@ -86,11 +86,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { return 0; // OpenBSD runs on anything. } - - -double OS::nan_value() { - return NAN; -} int OS::ActivationFrameAlignment() { ======================================= --- /branches/bleeding_edge/src/platform-posix.cc Wed Dec 2 05:38:50 2009 +++ /branches/bleeding_edge/src/platform-posix.cc Thu Dec 3 01:29:21 2009 @@ -60,6 +60,13 @@ double modulo(double x, double y) { return fmod(x, y); } + + +double OS::nan_value() { + // NAN from math.h is defined in C99 and not in POSIX. + return NAN; +} + // ---------------------------------------------------------------------------- // POSIX date/time support. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
