Reviewed by Eric Seidel.
Move wince/mt19937ar.c to ThirdParty and make it a policy choice
https://bugs.webkit.org/show_bug.cgi?id=53253
Move implementation of Mersenne Twister pseudorandom number generator to
ThirdParty since it is a third party library.
* Source/ThirdParty/mt19937ar.c: Copied from Source/JavaScriptCore/wtf/wince/mt19937ar.c.
2011-01-29 Daniel Bates <dbates@rim.com>
Reviewed by Eric Seidel.
Move wince/mt19937ar.c to ThirdParty and make it a policy choice
https://bugs.webkit.org/show_bug.cgi?id=53253
Make inclusion of MT19937 a policy decision.
Currently, we hardcoded to use MT19937 when building for
Windows CE. Instead, we should make this a policy decision
with the Windows CE port using this by default.
* JavaScriptCore.pri: Append Source/ThirdParty to the end
of the list include directories.
* wtf/CMakeLists.txt: Ditto.
* wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
building for Windows CE.
* wtf/RandomNumber.cpp:
(WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-01-29 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Move wince/mt19937ar.c to ThirdParty and make it a policy choice
+ https://bugs.webkit.org/show_bug.cgi?id=53253
+
+ Move implementation of Mersenne Twister pseudorandom number generator to
+ ThirdParty since it is a third party library.
+
+ * Source/ThirdParty/mt19937ar.c: Copied from Source/JavaScriptCore/wtf/wince/mt19937ar.c.
+
2011-01-29 Dan Winship <danw@gnome.org>
Reviewed by Xan Lopez.
+2011-01-29 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Move wince/mt19937ar.c to ThirdParty and make it a policy choice
+ https://bugs.webkit.org/show_bug.cgi?id=53253
+
+ Make inclusion of MT19937 a policy decision.
+
+ Currently, we hardcoded to use MT19937 when building for
+ Windows CE. Instead, we should make this a policy decision
+ with the Windows CE port using this by default.
+
+ * JavaScriptCore.pri: Append Source/ThirdParty to the end
+ of the list include directories.
+ * wtf/CMakeLists.txt: Ditto.
+ * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
+ building for Windows CE.
+ * wtf/RandomNumber.cpp:
+ (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
+
2011-01-29 Cameron Zwarich <zwarich@apple.com>
Reviewed by David Kilzer.
JAVASCRIPTCORE_INCLUDEPATH = \
$$PWD \
$$PWD/.. \
+ $$PWD/../ThirdParty \
$$PWD/assembler \
$$PWD/bytecode \
$$PWD/bytecompiler \
LIST(APPEND WTF_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
+ "${CMAKE_SOURCE_DIR}/ThirdParty"
)
WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
#if OS(WINCE)
#include <ce_time.h>
+#define WTF_USE_MERSENNE_TWISTER_19937 1
#endif
#if (PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && OS(DARWIN) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
#include <stdint.h>
#include <stdlib.h>
-#if OS(WINCE)
+#if USE(MERSENNE_TWISTER_19937)
extern "C" {
-#include "wince/mt19937ar.c"
+#include "mt19937ar.c"
}
#endif
// Mask off the low 53bits
fullRandom &= (1LL << 53) - 1;
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
-#elif OS(WINCE)
+#elif USE(MERSENNE_TWISTER_19937)
return genrand_res53();
#elif OS(WINDOWS)
uint32_t part1 = rand() & (RAND_MAX - 1);