| Index: src/platform-posix.cc
|
| diff --git a/src/platform-posix.cc b/src/platform-posix.cc
|
| index 59066ea39ee117c36234507bc0a35315dbdfed9c..66316594c8ce3fdfe90cc4fd296f08325b653eb5 100644
|
| --- a/src/platform-posix.cc
|
| +++ b/src/platform-posix.cc
|
| @@ -147,15 +147,6 @@ 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;
|
| @@ -313,20 +304,11 @@ int OS::VSNPrintF(Vector<char> str,
|
|
|
| #if defined(V8_TARGET_ARCH_IA32)
|
| static OS::MemCopyFunction memcopy_function = NULL;
|
| -static LazyMutex memcopy_function_mutex = LAZY_MUTEX_INITIALIZER;
|
| // Defined in codegen-ia32.cc.
|
| OS::MemCopyFunction CreateMemCopyFunction();
|
|
|
| // Copy memory area to disjoint memory area.
|
| void OS::MemCopy(void* dest, const void* src, size_t size) {
|
| - if (memcopy_function == NULL) {
|
| - ScopedLock lock(memcopy_function_mutex.Pointer());
|
| - if (memcopy_function == NULL) {
|
| - OS::MemCopyFunction temp = CreateMemCopyFunction();
|
| - MemoryBarrier();
|
| - memcopy_function = temp;
|
| - }
|
| - }
|
| // Note: here we rely on dependent reads being ordered. This is true
|
| // on all architectures we currently support.
|
| (*memcopy_function)(dest, src, size);
|
| @@ -336,6 +318,18 @@ void OS::MemCopy(void* dest, const void* src, size_t size) {
|
| }
|
| #endif // V8_TARGET_ARCH_IA32
|
|
|
| +
|
| +void POSIXPostSetUp() {
|
| +#if defined(V8_TARGET_ARCH_IA32)
|
| + memcopy_function = CreateMemCopyFunction();
|
| +#endif
|
| + init_fast_sin_function();
|
| + init_fast_cos_function();
|
| + init_fast_tan_function();
|
| + init_fast_log_function();
|
| + init_fast_sqrt_function();
|
| +}
|
| +
|
| // ----------------------------------------------------------------------------
|
| // POSIX string support.
|
| //
|
|
|