| Index: src/platform-posix.cc
|
| diff --git a/src/platform-posix.cc b/src/platform-posix.cc
|
| index a729b662605ad1377395cf7f0fb9668d3863ce48..fc26cc6b025a88cd4a4916947fabdd9fd714c99b 100644
|
| --- a/src/platform-posix.cc
|
| +++ b/src/platform-posix.cc
|
| @@ -129,13 +129,10 @@ double modulo(double x, double y) {
|
|
|
| #define UNARY_MATH_FUNCTION(name, generator) \
|
| static UnaryMathFunction fast_##name##_function = NULL; \
|
| -V8_DECLARE_ONCE(fast_##name##_init_once); \
|
| void init_fast_##name##_function() { \
|
| fast_##name##_function = generator; \
|
| } \
|
| double fast_##name(double x) { \
|
| - CallOnce(&fast_##name##_init_once, \
|
| - &init_fast_##name##_function); \
|
| return (*fast_##name##_function)(x); \
|
| }
|
|
|
| @@ -148,6 +145,15 @@ UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction())
|
| #undef MATH_FUNCTION
|
|
|
|
|
| +void MathSetup() {
|
| + init_fast_sin_function();
|
| + init_fast_cos_function();
|
| + init_fast_tan_function();
|
| + init_fast_log_function();
|
| + init_fast_sqrt_function();
|
| +}
|
| +
|
| +
|
| double OS::nan_value() {
|
| // NAN from math.h is defined in C99 and not in POSIX.
|
| return NAN;
|
|
|