diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp 2016-05-30 23:00:53.833460310 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp 2016-05-30 23:01:23.945277197 -0400 @@ -156,9 +156,10 @@ Structure::~Structure() { if (m_previous) { - if (m_nameInPrevious) - m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious); - else + if (m_nameInPrevious) { + unsigned attrInPrev = m_attributesInPrevious; + m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr(m_nameInPrevious.get()), attrInPrev), m_specificValueInPrevious); + } else m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious); } diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h 2016-05-30 23:00:53.832460315 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h 2016-05-30 23:01:23.945277197 -0400 @@ -316,8 +316,10 @@ Structure* existingTransition = singleTransition(); TransitionTable* transitionTable = new TransitionTable; setTransitionTable(transitionTable); - if (existingTransition) - add(StructureTransitionTableHash::Key(RefPtr(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); + if (existingTransition) { + const unsigned attrsInPrev = existingTransition->m_attributesInPrevious; + add(StructureTransitionTableHash::Key(RefPtr(existingTransition->m_nameInPrevious.get()), attrsInPrev), existingTransition, existingTransition->m_specificValueInPrevious); + } } } // namespace JSC diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h 2016-05-30 23:00:53.834460304 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h 2016-05-30 23:01:23.946277190 -0400 @@ -257,19 +257,20 @@ using std::swap; -#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION) - // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined. + // Work around MSVC's standard library, whose swap for pairs does not swap by component. + template inline void hashTableSwap(T& a, T& b) + { + swap(a, b); + } - // swap pairs by component, in case of pair members that specialize swap - template inline void swap(pair& a, pair& b) + template inline void hashTableSwap(pair& a, pair& b) { swap(a.first, b.first); swap(a.second, b.second); } -#endif template struct Mover; - template struct Mover { static void move(T& from, T& to) { swap(from, to); } }; + template struct Mover { static void move(T& from, T& to) { hashTableSwap(from, to); } }; template struct Mover { static void move(T& from, T& to) { to = from; } }; template class IdentityHashTranslator { diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2016-05-30 23:00:53.836460292 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2016-05-30 23:01:23.946277190 -0400 @@ -76,6 +76,9 @@ #if defined(__GNUC__) && !COMPILER(RVCT) #define WTF_COMPILER_GCC 1 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) +/* Define this for !GCC compilers, just so we can write things like GCC_VERSION_AT_LEAST(4, 1, 0). */ +#define GCC_VERSION_AT_LEAST(major, minor, patch) 0 #endif /* COMPILER(MINGW) - MinGW GCC */ diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h 2016-05-30 23:00:53.835460297 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h 2016-05-30 23:01:23.946277190 -0400 @@ -26,6 +26,9 @@ #if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) #include +#if defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__) +#include +#endif #endif namespace WTF { @@ -166,13 +169,21 @@ typedef T Type; }; -#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) - +#if COMPILER(CLANG) || GCC_VERSION_AT_LEAST(4, 6, 0) || (defined(_MSC_VER) && (_MSC_VER >= 1400) && (_MSC_VER < 1600) && !defined(__INTEL_COMPILER)) + // VC8 (VS2005) and later has __has_trivial_constructor and __has_trivial_destructor, + // but the implementation returns false for built-in types. We add the extra IsPod condition to + // work around this. + template struct HasTrivialConstructor { + static const bool value = __has_trivial_constructor(T) || IsPod >::value; + }; + template struct HasTrivialDestructor { + static const bool value = __has_trivial_destructor(T) || IsPod >::value; + }; +#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) // GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace. // VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace. template struct HasTrivialConstructor : public std::tr1::has_trivial_constructor { }; template struct HasTrivialDestructor : public std::tr1::has_trivial_destructor { }; - #else // This compiler doesn't provide type traits, so we provide basic HasTrivialConstructor @@ -189,15 +200,8 @@ typedef IntegralConstant true_type; typedef IntegralConstant false_type; -#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) - // VC8 (VS2005) and later have built-in compiler support for HasTrivialConstructor / HasTrivialDestructor, - // but for some unexplained reason it doesn't work on built-in types. - template struct HasTrivialConstructor : public IntegralConstant{ }; - template struct HasTrivialDestructor : public IntegralConstant{ }; -#else template struct HasTrivialConstructor : public false_type{ }; template struct HasTrivialDestructor : public false_type{ }; -#endif template struct HasTrivialConstructor : public true_type{ }; template struct HasTrivialDestructor : public true_type{ }; diff -Naur qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp --- qt-everywhere-opensource-src-4.8.7.old/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp 2016-05-30 23:00:53.827460346 -0400 +++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp 2016-05-30 23:01:23.946277190 -0400 @@ -719,7 +719,7 @@ constructor.setupOffsets(); - return false; + return NULL; };