Commit dfe84470 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com>

        Reviewed by Eric Seidel.

        Mingw-w64 fixes for JavaScriptCore
        https://bugs.webkit.org/show_bug.cgi?id=35607

        * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
        (JSC::Heap::allocateBlock):
        (JSC::Heap::freeBlockPtr):
        (JSC::currentThreadStackBase):
        (JSC::currentThreadStackBase):
        * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7948732e
2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com>
Reviewed by Eric Seidel.
Mingw-w64 fixes for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=35607
* runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlockPtr):
(JSC::currentThreadStackBase):
(JSC::currentThreadStackBase):
* wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
2010-04-02 Geoffrey Garen <ggaren@apple.com>
 
Build fix: updated the .def file.
......
......@@ -201,7 +201,7 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
#elif OS(WINCE)
void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
#elif OS(WINDOWS)
#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR)
#if COMPILER(MINGW) && !COMPILER(MINGW64)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#else
void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
......@@ -292,7 +292,7 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
#elif OS(WINCE)
VirtualFree(block, 0, MEM_RELEASE);
#elif OS(WINDOWS)
#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR)
#if COMPILER(MINGW) && !COMPILER(MINGW64)
__mingw_aligned_free(block);
#else
_aligned_free(block);
......
......@@ -79,9 +79,14 @@
#endif
/* COMPILER(MINGW) - MinGW GCC */
#if defined(MINGW) || defined(__MINGW32__)
/* COMPILER(MINGW64) - mingw-w64 GCC - only used as additional check to exclude mingw.org specific functions */
#if defined(__MINGW32__)
#define WTF_COMPILER_MINGW 1
#endif
#include <_mingw.h> /* private MinGW header */
#if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */
#define WTF_COMPILER_MINGW64 1
#endif /* __MINGW64_VERSION_MAJOR */
#endif /* __MINGW32__ */
/* COMPILER(WINSCW) - CodeWarrior for Symbian emulator */
#if defined(__WINSCW__)
......@@ -919,6 +924,8 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86_64) && OS(WINDOWS) && COMPILER(MINGW64) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
......@@ -996,6 +1003,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#if PLATFORM(QT)
#if (CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
|| (CPU(X86_64) && OS(WINDOWS) && COMPILER(MINGW64) && GCC_VERSION >= 40100) \
|| (CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)) \
|| (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \
|| (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment