Diff
Modified: trunk/Source/_javascript_Core/jsc.cpp (155401 => 155402)
--- trunk/Source/_javascript_Core/jsc.cpp 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/_javascript_Core/jsc.cpp 2013-09-09 23:37:43 UTC (rev 155402)
@@ -261,8 +261,6 @@
}
};
-COMPILE_ASSERT(!IsInteger<GlobalObject>::value, WTF_IsInteger_GlobalObject_false);
-
const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) };
const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &_javascript_ExperimentsEnabled, 0 };
Modified: trunk/Source/_javascript_Core/testRegExp.cpp (155401 => 155402)
--- trunk/Source/_javascript_Core/testRegExp.cpp 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/_javascript_Core/testRegExp.cpp 2013-09-09 23:37:43 UTC (rev 155402)
@@ -139,8 +139,6 @@
}
};
-COMPILE_ASSERT(!IsInteger<GlobalObject>::value, WTF_IsInteger_GlobalObject_false);
-
const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) };
GlobalObject::GlobalObject(VM& vm, Structure* structure, const Vector<String>& arguments)
Modified: trunk/Source/WTF/ChangeLog (155401 => 155402)
--- trunk/Source/WTF/ChangeLog 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/ChangeLog 2013-09-09 23:37:43 UTC (rev 155402)
@@ -1,3 +1,20 @@
+2013-09-09 Anders Carlsson <[email protected]>
+
+ Remove wtf/TypeTraits.h
+ https://bugs.webkit.org/show_bug.cgi?id=121047
+
+ Reviewed by Darin Adler.
+
+ * GNUmakefile.list.am:
+ * WTF.pro:
+ * WTF.vcxproj/WTF.vcxproj:
+ * WTF.vcxproj/WTF.vcxproj.filters:
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/TypeTraits.cpp: Removed.
+ * wtf/TypeTraits.h: Removed.
+ * wtf/VectorTraits.h:
+
2013-09-09 Luciano Wolf <[email protected]>
Nix upstreaming - Adding stubs and Nix specific platform files
Modified: trunk/Source/WTF/GNUmakefile.list.am (155401 => 155402)
--- trunk/Source/WTF/GNUmakefile.list.am 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/GNUmakefile.list.am 2013-09-09 23:37:43 UTC (rev 155402)
@@ -178,8 +178,6 @@
Source/WTF/wtf/ThreadingPthreads.cpp \
Source/WTF/wtf/ThreadingWin.cpp \
Source/WTF/wtf/TriState.h \
- Source/WTF/wtf/TypeTraits.cpp \
- Source/WTF/wtf/TypeTraits.h \
Source/WTF/wtf/UnionFind.h \
Source/WTF/wtf/UniStdExtras.h \
Source/WTF/wtf/VMTags.h \
Modified: trunk/Source/WTF/WTF.pro (155401 => 155402)
--- trunk/Source/WTF/WTF.pro 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/WTF.pro 2013-09-09 23:37:43 UTC (rev 155402)
@@ -154,7 +154,6 @@
ThreadRestrictionVerifier.h \
ThreadSafeRefCounted.h \
ThreadSpecific.h \
- TypeTraits.h \
unicode/CharacterNames.h \
unicode/Collator.h \
unicode/icu/UnicodeIcu.h \
@@ -220,7 +219,6 @@
StringPrintStream.cpp \
TCSystemAlloc.cpp \
Threading.cpp \
- TypeTraits.cpp \
WTFThreadData.cpp \
text/AtomicString.cpp \
text/AtomicStringTable.cpp \
Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj (155401 => 155402)
--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj 2013-09-09 23:37:43 UTC (rev 155402)
@@ -109,7 +109,6 @@
<ClCompile Include="..\wtf\threadspecificWin.cpp" />
<ClCompile Include="..\wtf\threads\BinarySemaphore.cpp" />
<ClCompile Include="..\wtf\threads\win\BinarySemaphoreWin.cpp" />
- <ClCompile Include="..\wtf\TypeTraits.cpp" />
<ClCompile Include="..\wtf\unicode\icu\CollatorICU.cpp" />
<ClCompile Include="..\wtf\unicode\UTF8.cpp" />
<ClCompile Include="..\wtf\win\MainThreadWin.cpp" />
@@ -261,7 +260,6 @@
<ClInclude Include="..\wtf\threadsafeRefCounted.h" />
<ClInclude Include="..\wtf\threadspecific.h" />
<ClInclude Include="..\wtf\threads\BinarySemaphore.h" />
- <ClInclude Include="..\wtf\TypeTraits.h" />
<ClInclude Include="..\wtf\unicode\CharacterNames.h" />
<ClInclude Include="..\wtf\unicode\Collator.h" />
<ClInclude Include="..\wtf\unicode\icu\UnicodeIcu.h" />
Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters (155401 => 155402)
--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters 2013-09-09 23:37:43 UTC (rev 155402)
@@ -198,9 +198,6 @@
<ClCompile Include="..\wtf\ThreadingWin.cpp">
<Filter>wtf</Filter>
</ClCompile>
- <ClCompile Include="..\wtf\TypeTraits.cpp">
- <Filter>wtf</Filter>
- </ClCompile>
<ClCompile Include="..\wtf\WTFThreadData.cpp">
<Filter>wtf</Filter>
</ClCompile>
@@ -647,9 +644,6 @@
<ClInclude Include="..\wtf\ThreadRestrictionVerifier.h">
<Filter>wtf</Filter>
</ClInclude>
- <ClInclude Include="..\wtf\TypeTraits.h">
- <Filter>wtf</Filter>
- </ClInclude>
<ClInclude Include="..\wtf\ValueCheck.h">
<Filter>wtf</Filter>
</ClInclude>
Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (155401 => 155402)
--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2013-09-09 23:37:43 UTC (rev 155402)
@@ -243,8 +243,6 @@
A8A47452151A825B004123FF /* BinarySemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4733B151A825B004123FF /* BinarySemaphore.h */; };
A8A47454151A825B004123FF /* ThreadSafeRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */; };
A8A47455151A825B004123FF /* ThreadSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4733F151A825B004123FF /* ThreadSpecific.h */; };
- A8A47458151A825B004123FF /* TypeTraits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47342151A825B004123FF /* TypeTraits.cpp */; };
- A8A47459151A825B004123FF /* TypeTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47343151A825B004123FF /* TypeTraits.h */; };
A8A4745E151A825B004123FF /* CharacterNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47349151A825B004123FF /* CharacterNames.h */; };
A8A4745F151A825B004123FF /* Collator.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4734A151A825B004123FF /* Collator.h */; };
A8A47460151A825B004123FF /* CollatorDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4734B151A825B004123FF /* CollatorDefault.cpp */; };
@@ -516,8 +514,6 @@
A8A4733B151A825B004123FF /* BinarySemaphore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BinarySemaphore.h; sourceTree = "<group>"; };
A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeRefCounted.h; sourceTree = "<group>"; };
A8A4733F151A825B004123FF /* ThreadSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSpecific.h; sourceTree = "<group>"; };
- A8A47342151A825B004123FF /* TypeTraits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypeTraits.cpp; sourceTree = "<group>"; };
- A8A47343151A825B004123FF /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = "<group>"; };
A8A47349151A825B004123FF /* CharacterNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterNames.h; sourceTree = "<group>"; };
A8A4734A151A825B004123FF /* Collator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Collator.h; sourceTree = "<group>"; };
A8A4734B151A825B004123FF /* CollatorDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CollatorDefault.cpp; sourceTree = "<group>"; };
@@ -793,8 +789,6 @@
A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */,
A8A4733F151A825B004123FF /* ThreadSpecific.h */,
149EF16216BBFE0D000A4331 /* TriState.h */,
- A8A47342151A825B004123FF /* TypeTraits.cpp */,
- A8A47343151A825B004123FF /* TypeTraits.h */,
A8A4735C151A825B004123FF /* UnionFind.h */,
A8A4736F151A825B004123FF /* ValueCheck.h */,
A8A47370151A825B004123FF /* Vector.h */,
@@ -1081,7 +1075,6 @@
A8A47454151A825B004123FF /* ThreadSafeRefCounted.h in Headers */,
A8A47455151A825B004123FF /* ThreadSpecific.h in Headers */,
149EF16316BBFE0D000A4331 /* TriState.h in Headers */,
- A8A47459151A825B004123FF /* TypeTraits.h in Headers */,
A8A47467151A825B004123FF /* Unicode.h in Headers */,
A8A47464151A825B004123FF /* UnicodeIcu.h in Headers */,
A8A47468151A825B004123FF /* UnicodeMacrosFromICU.h in Headers */,
@@ -1231,7 +1224,6 @@
A8A47448151A825B004123FF /* ThreadIdentifierDataPthreads.cpp in Sources */,
A8A4744A151A825B004123FF /* Threading.cpp in Sources */,
A8A4744E151A825B004123FF /* ThreadingPthreads.cpp in Sources */,
- A8A47458151A825B004123FF /* TypeTraits.cpp in Sources */,
A8A47469151A825B004123FF /* UTF8.cpp in Sources */,
1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */,
A8A47445151A825B004123FF /* WTFString.cpp in Sources */,
Modified: trunk/Source/WTF/wtf/CMakeLists.txt (155401 => 155402)
--- trunk/Source/WTF/wtf/CMakeLists.txt 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2013-09-09 23:37:43 UTC (rev 155402)
@@ -106,7 +106,6 @@
ThreadSpecific.h
Threading.h
ThreadingPrimitives.h
- TypeTraits.h
VMTags.h
ValueCheck.h
Vector.h
@@ -182,7 +181,6 @@
StringPrintStream.cpp
TCSystemAlloc.cpp
Threading.cpp
- TypeTraits.cpp
WTFThreadData.cpp
dtoa.cpp
Deleted: trunk/Source/WTF/wtf/TypeTraits.cpp (155401 => 155402)
--- trunk/Source/WTF/wtf/TypeTraits.cpp 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/wtf/TypeTraits.cpp 2013-09-09 23:37:43 UTC (rev 155402)
@@ -1,155 +0,0 @@
- /*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "TypeTraits.h"
-
-#include "Assertions.h"
-
-namespace WTF {
-
-COMPILE_ASSERT(IsInteger<bool>::value, WTF_IsInteger_bool_true);
-COMPILE_ASSERT(IsInteger<char>::value, WTF_IsInteger_char_true);
-COMPILE_ASSERT(IsInteger<signed char>::value, WTF_IsInteger_signed_char_true);
-COMPILE_ASSERT(IsInteger<unsigned char>::value, WTF_IsInteger_unsigned_char_true);
-COMPILE_ASSERT(IsInteger<short>::value, WTF_IsInteger_short_true);
-COMPILE_ASSERT(IsInteger<unsigned short>::value, WTF_IsInteger_unsigned_short_true);
-COMPILE_ASSERT(IsInteger<int>::value, WTF_IsInteger_int_true);
-COMPILE_ASSERT(IsInteger<unsigned int>::value, WTF_IsInteger_unsigned_int_true);
-COMPILE_ASSERT(IsInteger<long>::value, WTF_IsInteger_long_true);
-COMPILE_ASSERT(IsInteger<unsigned long>::value, WTF_IsInteger_unsigned_long_true);
-COMPILE_ASSERT(IsInteger<long long>::value, WTF_IsInteger_long_long_true);
-COMPILE_ASSERT(IsInteger<unsigned long long>::value, WTF_IsInteger_unsigned_long_long_true);
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-COMPILE_ASSERT(IsInteger<wchar_t>::value, WTF_IsInteger_wchar_t_true);
-#endif
-COMPILE_ASSERT(!IsInteger<char*>::value, WTF_IsInteger_char_pointer_false);
-COMPILE_ASSERT(!IsInteger<const char*>::value, WTF_IsInteger_const_char_pointer_false);
-COMPILE_ASSERT(!IsInteger<volatile char*>::value, WTF_IsInteger_volatile_char_pointer_false);
-COMPILE_ASSERT(!IsInteger<double>::value, WTF_IsInteger_double_false);
-COMPILE_ASSERT(!IsInteger<float>::value, WTF_IsInteger_float_false);
-
-COMPILE_ASSERT(IsFloatingPoint<float>::value, WTF_IsFloatingPoint_float_true);
-COMPILE_ASSERT(IsFloatingPoint<double>::value, WTF_IsFloatingPoint_double_true);
-COMPILE_ASSERT(IsFloatingPoint<long double>::value, WTF_IsFloatingPoint_long_double_true);
-COMPILE_ASSERT(!IsFloatingPoint<int>::value, WTF_IsFloatingPoint_int_false);
-
-COMPILE_ASSERT(IsPod<bool>::value, WTF_IsPod_bool_true);
-COMPILE_ASSERT(IsPod<char>::value, WTF_IsPod_char_true);
-COMPILE_ASSERT(IsPod<signed char>::value, WTF_IsPod_signed_char_true);
-COMPILE_ASSERT(IsPod<unsigned char>::value, WTF_IsPod_unsigned_char_true);
-COMPILE_ASSERT(IsPod<short>::value, WTF_IsPod_short_true);
-COMPILE_ASSERT(IsPod<unsigned short>::value, WTF_IsPod_unsigned_short_true);
-COMPILE_ASSERT(IsPod<int>::value, WTF_IsPod_int_true);
-COMPILE_ASSERT(IsPod<unsigned int>::value, WTF_IsPod_unsigned_int_true);
-COMPILE_ASSERT(IsPod<long>::value, WTF_IsPod_long_true);
-COMPILE_ASSERT(IsPod<unsigned long>::value, WTF_IsPod_unsigned_long_true);
-COMPILE_ASSERT(IsPod<long long>::value, WTF_IsPod_long_long_true);
-COMPILE_ASSERT(IsPod<unsigned long long>::value, WTF_IsPod_unsigned_long_long_true);
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-COMPILE_ASSERT(IsPod<wchar_t>::value, WTF_IsPod_wchar_t_true);
-#endif
-COMPILE_ASSERT(IsPod<char*>::value, WTF_IsPod_char_pointer_true);
-COMPILE_ASSERT(IsPod<const char*>::value, WTF_IsPod_const_char_pointer_true);
-COMPILE_ASSERT(IsPod<volatile char*>::value, WTF_IsPod_volatile_char_pointer_true);
-COMPILE_ASSERT(IsPod<double>::value, WTF_IsPod_double_true);
-COMPILE_ASSERT(IsPod<long double>::value, WTF_IsPod_long_double_true);
-COMPILE_ASSERT(IsPod<float>::value, WTF_IsPod_float_true);
-COMPILE_ASSERT(!IsPod<IsPod<bool> >::value, WTF_IsPod_struct_false);
-
-enum IsConvertibleToIntegerCheck { };
-COMPILE_ASSERT(IsConvertibleToInteger<IsConvertibleToIntegerCheck>::value, WTF_IsConvertibleToInteger_enum_true);
-COMPILE_ASSERT(IsConvertibleToInteger<bool>::value, WTF_IsConvertibleToInteger_bool_true);
-COMPILE_ASSERT(IsConvertibleToInteger<char>::value, WTF_IsConvertibleToInteger_char_true);
-COMPILE_ASSERT(IsConvertibleToInteger<signed char>::value, WTF_IsConvertibleToInteger_signed_char_true);
-COMPILE_ASSERT(IsConvertibleToInteger<unsigned char>::value, WTF_IsConvertibleToInteger_unsigned_char_true);
-COMPILE_ASSERT(IsConvertibleToInteger<short>::value, WTF_IsConvertibleToInteger_short_true);
-COMPILE_ASSERT(IsConvertibleToInteger<unsigned short>::value, WTF_IsConvertibleToInteger_unsigned_short_true);
-COMPILE_ASSERT(IsConvertibleToInteger<int>::value, WTF_IsConvertibleToInteger_int_true);
-COMPILE_ASSERT(IsConvertibleToInteger<unsigned int>::value, WTF_IsConvertibleToInteger_unsigned_int_true);
-COMPILE_ASSERT(IsConvertibleToInteger<long>::value, WTF_IsConvertibleToInteger_long_true);
-COMPILE_ASSERT(IsConvertibleToInteger<unsigned long>::value, WTF_IsConvertibleToInteger_unsigned_long_true);
-COMPILE_ASSERT(IsConvertibleToInteger<long long>::value, WTF_IsConvertibleToInteger_long_long_true);
-COMPILE_ASSERT(IsConvertibleToInteger<unsigned long long>::value, WTF_IsConvertibleToInteger_unsigned_long_long_true);
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-COMPILE_ASSERT(IsConvertibleToInteger<wchar_t>::value, WTF_IsConvertibleToInteger_wchar_t_true);
-#endif
-COMPILE_ASSERT(IsConvertibleToInteger<double>::value, WTF_IsConvertibleToInteger_double_true);
-COMPILE_ASSERT(IsConvertibleToInteger<long double>::value, WTF_IsConvertibleToInteger_long_double_true);
-COMPILE_ASSERT(IsConvertibleToInteger<float>::value, WTF_IsConvertibleToInteger_float_true);
-COMPILE_ASSERT(!IsConvertibleToInteger<char*>::value, WTF_IsConvertibleToInteger_char_pointer_false);
-COMPILE_ASSERT(!IsConvertibleToInteger<const char*>::value, WTF_IsConvertibleToInteger_const_char_pointer_false);
-COMPILE_ASSERT(!IsConvertibleToInteger<volatile char*>::value, WTF_IsConvertibleToInteger_volatile_char_pointer_false);
-COMPILE_ASSERT(!IsConvertibleToInteger<IsConvertibleToInteger<bool> >::value, WTF_IsConvertibleToInteger_struct_false);
-
-COMPILE_ASSERT((IsSameType<bool, bool>::value), WTF_IsSameType_bool_true);
-COMPILE_ASSERT((IsSameType<int*, int*>::value), WTF_IsSameType_int_pointer_true);
-COMPILE_ASSERT((!IsSameType<int, int*>::value), WTF_IsSameType_int_int_pointer_false);
-COMPILE_ASSERT((!IsSameType<bool, const bool>::value), WTF_IsSameType_const_change_false);
-COMPILE_ASSERT((!IsSameType<bool, volatile bool>::value), WTF_IsSameType_volatile_change_false);
-
-template <typename T>
-class TestBaseClass {
-};
-
-class TestDerivedClass : public TestBaseClass<int> {
-};
-
-COMPILE_ASSERT((IsSubclass<TestDerivedClass, TestBaseClass<int> >::value), WTF_Test_IsSubclass_Derived_From_Base);
-COMPILE_ASSERT((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value), WTF_Test_IsSubclass_Base_From_Derived);
-COMPILE_ASSERT((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value), WTF_Test_IsSubclassOfTemplate_Base_From_Derived);
-COMPILE_ASSERT((IsSameType<RemoveTemplate<TestBaseClass<int>, TestBaseClass>::Type, int>::value), WTF_Test_RemoveTemplate);
-COMPILE_ASSERT((IsSameType<RemoveTemplate<int, TestBaseClass>::Type, int>::value), WTF_Test_RemoveTemplate_WithoutTemplate);
-
-
-COMPILE_ASSERT((IsSameType<bool, RemoveConst<const bool>::Type>::value), WTF_test_RemoveConst_const_bool);
-COMPILE_ASSERT((!IsSameType<bool, RemoveConst<volatile bool>::Type>::value), WTF_test_RemoveConst_volatile_bool);
-
-COMPILE_ASSERT((IsSameType<bool, RemoveVolatile<bool>::Type>::value), WTF_test_RemoveVolatile_bool);
-COMPILE_ASSERT((!IsSameType<bool, RemoveVolatile<const bool>::Type>::value), WTF_test_RemoveVolatile_const_bool);
-COMPILE_ASSERT((IsSameType<bool, RemoveVolatile<volatile bool>::Type>::value), WTF_test_RemoveVolatile_volatile_bool);
-
-COMPILE_ASSERT((IsSameType<bool, RemoveConstVolatile<bool>::Type>::value), WTF_test_RemoveConstVolatile_bool);
-COMPILE_ASSERT((IsSameType<bool, RemoveConstVolatile<const bool>::Type>::value), WTF_test_RemoveConstVolatile_const_bool);
-COMPILE_ASSERT((IsSameType<bool, RemoveConstVolatile<volatile bool>::Type>::value), WTF_test_RemoveConstVolatile_volatile_bool);
-COMPILE_ASSERT((IsSameType<bool, RemoveConstVolatile<const volatile bool>::Type>::value), WTF_test_RemoveConstVolatile_const_volatile_bool);
-
-COMPILE_ASSERT((IsSameType<int, RemovePointer<int>::Type>::value), WTF_Test_RemovePointer_int);
-COMPILE_ASSERT((IsSameType<int, RemovePointer<int*>::Type>::value), WTF_Test_RemovePointer_int_pointer);
-COMPILE_ASSERT((!IsSameType<int, RemovePointer<int**>::Type>::value), WTF_Test_RemovePointer_int_pointer_pointer);
-
-COMPILE_ASSERT((IsSameType<int, RemoveReference<int>::Type>::value), WTF_Test_RemoveReference_int);
-COMPILE_ASSERT((IsSameType<int, RemoveReference<int&>::Type>::value), WTF_Test_RemoveReference_int_reference);
-
-
-typedef int IntArray[];
-typedef int IntArraySized[4];
-
-COMPILE_ASSERT((IsArray<IntArray>::value), WTF_Test_IsArray_int_array);
-COMPILE_ASSERT((IsArray<IntArraySized>::value), WTF_Test_IsArray_int_sized_array);
-
-COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArray>::Type>::value), WTF_Test_RemoveExtent_int_array);
-COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArraySized>::Type>::value), WTF_Test_RemoveReference_int_sized_array);
-
-COMPILE_ASSERT((IsSameType<int*, DecayArray<IntArray>::Type>::value), WTF_Test_DecayArray_int_array);
-COMPILE_ASSERT((IsSameType<int*, DecayArray<IntArraySized>::Type>::value), WTF_Test_DecayArray_int_sized_array);
-
-} // namespace WTF
Deleted: trunk/Source/WTF/wtf/TypeTraits.h (155401 => 155402)
--- trunk/Source/WTF/wtf/TypeTraits.h 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/wtf/TypeTraits.h 2013-09-09 23:37:43 UTC (rev 155402)
@@ -1,261 +0,0 @@
- /*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef TypeTraits_h
-#define TypeTraits_h
-
-#include <wtf/Platform.h>
-
-#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
-#include <type_traits>
-#if defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)
-#include <tr1/memory>
-#endif
-#endif
-
-namespace WTF {
-
- // The following are provided in this file:
- //
- // Conditional<Predicate, If, Then>::Type
- //
- // IsInteger<T>::value
- // IsPod<T>::value, see the definition for a note about its limitations
- // IsConvertibleToInteger<T>::value
- //
- // IsArray<T>::value
- //
- // IsSameType<T, U>::value
- //
- // RemovePointer<T>::Type
- // RemoveReference<T>::Type
- // RemoveConst<T>::Type
- // RemoveVolatile<T>::Type
- // RemoveConstVolatile<T>::Type
- // RemoveExtent<T>::Type
- //
- // DecayArray<T>::Type
- //
- // COMPILE_ASSERT's in TypeTraits.cpp illustrate their usage and what they do.
-
- template <bool Predicate, class If, class Then> struct Conditional { typedef If Type; };
- template <class If, class Then> struct Conditional<false, If, Then> { typedef Then Type; };
-
- template<typename T> struct IsInteger { static const bool value = false; };
- template<> struct IsInteger<bool> { static const bool value = true; };
- template<> struct IsInteger<char> { static const bool value = true; };
- template<> struct IsInteger<signed char> { static const bool value = true; };
- template<> struct IsInteger<unsigned char> { static const bool value = true; };
- template<> struct IsInteger<short> { static const bool value = true; };
- template<> struct IsInteger<unsigned short> { static const bool value = true; };
- template<> struct IsInteger<int> { static const bool value = true; };
- template<> struct IsInteger<unsigned int> { static const bool value = true; };
- template<> struct IsInteger<long> { static const bool value = true; };
- template<> struct IsInteger<unsigned long> { static const bool value = true; };
- template<> struct IsInteger<long long> { static const bool value = true; };
- template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
- template<> struct IsInteger<wchar_t> { static const bool value = true; };
-#endif
-
- template<typename T> struct IsFloatingPoint { static const bool value = false; };
- template<> struct IsFloatingPoint<float> { static const bool value = true; };
- template<> struct IsFloatingPoint<double> { static const bool value = true; };
- template<> struct IsFloatingPoint<long double> { static const bool value = true; };
-
- template<typename T> struct IsArithmetic { static const bool value = IsInteger<T>::value || IsFloatingPoint<T>::value; };
-
- // IsPod is misnamed as it doesn't cover all plain old data (pod) types.
- // Specifically, it doesn't allow for enums or for structs.
- template <typename T> struct IsPod { static const bool value = IsArithmetic<T>::value; };
- template <typename P> struct IsPod<P*> { static const bool value = true; };
-
- template<typename T> class IsConvertibleToInteger {
- // Avoid "possible loss of data" warning when using Microsoft's C++ compiler
- // by not converting int's to doubles.
- template<bool performCheck, typename U> class IsConvertibleToDouble;
- template<typename U> class IsConvertibleToDouble<false, U> {
- public:
- static const bool value = false;
- };
-
- template<typename U> class IsConvertibleToDouble<true, U> {
- typedef char YesType;
- struct NoType {
- char padding[8];
- };
-
- static YesType floatCheck(long double);
- static NoType floatCheck(...);
- static T& t;
- public:
- static const bool value = sizeof(floatCheck(t)) == sizeof(YesType);
- };
-
- public:
- static const bool value = IsInteger<T>::value || IsConvertibleToDouble<!IsInteger<T>::value, T>::value;
- };
-
-
- template <class T> struct IsArray {
- static const bool value = false;
- };
-
- template <class T> struct IsArray<T[]> {
- static const bool value = true;
- };
-
- template <class T, size_t N> struct IsArray<T[N]> {
- static const bool value = true;
- };
-
-
- template <typename T, typename U> struct IsSameType {
- static const bool value = false;
- };
-
- template <typename T> struct IsSameType<T, T> {
- static const bool value = true;
- };
-
- template <typename T, typename U> class IsSubclass {
- typedef char YesType;
- struct NoType {
- char padding[8];
- };
-
- static YesType subclassCheck(U*);
- static NoType subclassCheck(...);
- static T* t;
- public:
- static const bool value = sizeof(subclassCheck(t)) == sizeof(YesType);
- };
-
- template <typename T, template<class V> class U> class IsSubclassOfTemplate {
- typedef char YesType;
- struct NoType {
- char padding[8];
- };
-
- template<typename W> static YesType subclassCheck(U<W>*);
- static NoType subclassCheck(...);
- static T* t;
- public:
- static const bool value = sizeof(subclassCheck(t)) == sizeof(YesType);
- };
-
- template <typename T, template <class V> class OuterTemplate> struct RemoveTemplate {
- typedef T Type;
- };
-
- template <typename T, template <class V> class OuterTemplate> struct RemoveTemplate<OuterTemplate<T>, OuterTemplate> {
- typedef T Type;
- };
-
- template <typename T> struct RemoveConst {
- typedef T Type;
- };
-
- template <typename T> struct RemoveConst<const T> {
- typedef T Type;
- };
-
- template <typename T> struct RemoveVolatile {
- typedef T Type;
- };
-
- template <typename T> struct RemoveVolatile<volatile T> {
- typedef T Type;
- };
-
- template <typename T> struct RemoveConstVolatile {
- typedef typename RemoveVolatile<typename RemoveConst<T>::Type>::Type Type;
- };
-
- template <typename T> struct RemovePointer {
- typedef T Type;
- };
-
- template <typename T> struct RemovePointer<T*> {
- typedef T Type;
- };
-
- template <typename T> struct RemoveReference {
- typedef T Type;
- };
-
- template <typename T> struct RemoveReference<T&> {
- typedef T Type;
- };
-
- template <typename T> struct RemoveExtent {
- typedef T Type;
- };
-
- template <typename T> struct RemoveExtent<T[]> {
- typedef T Type;
- };
-
- template <typename T, size_t N> struct RemoveExtent<T[N]> {
- typedef T Type;
- };
-
- template <class T> struct DecayArray {
- typedef typename RemoveReference<T>::Type U;
- public:
- typedef typename Conditional<
- IsArray<U>::value,
- typename RemoveExtent<U>::Type*,
- typename RemoveConstVolatile<U>::Type
- >::Type Type;
- };
-
-#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 <typename T> struct HasTrivialConstructor {
- static const bool value = __has_trivial_constructor(T) || IsPod<RemoveConstVolatile<T> >::value;
- };
- template <typename T> struct HasTrivialDestructor {
- static const bool value = __has_trivial_destructor(T) || IsPod<RemoveConstVolatile<T> >::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<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
- template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
-#else
- // For compilers that don't support detection of trivial constructors and destructors in classes,
- // we use a template that returns true for any POD type that IsPod can detect (see IsPod caveats above),
- // but false for all other types (which includes all classes). This will give false negatives, which can hurt
- // performance, but avoids false positives, which would result in incorrect behavior.
- template <typename T> struct HasTrivialConstructor {
- static const bool value = IsPod<RemoveConstVolatile<T> >::value;
- };
- template <typename T> struct HasTrivialDestructor {
- static const bool value = IsPod<RemoveConstVolatile<T> >::value;
- };
-#endif
-
-} // namespace WTF
-
-#endif // TypeTraits_h
Modified: trunk/Source/WTF/wtf/VectorTraits.h (155401 => 155402)
--- trunk/Source/WTF/wtf/VectorTraits.h 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WTF/wtf/VectorTraits.h 2013-09-09 23:37:43 UTC (rev 155402)
@@ -25,7 +25,6 @@
#include <wtf/OwnPtr.h>
#include <wtf/Ref.h>
#include <wtf/RefPtr.h>
-#include <wtf/TypeTraits.h>
#include <utility>
#include <memory>
@@ -63,7 +62,7 @@
};
template<typename T>
- struct VectorTraits : VectorTraitsBase<IsPod<T>::value, T> { };
+ struct VectorTraits : VectorTraitsBase<std::is_pod<T>::value, T> { };
struct SimpleClassVectorTraits : VectorTraitsBase<false, void>
{
@@ -90,7 +89,7 @@
struct VectorTraits<AtomicString> : SimpleClassVectorTraits { };
template<typename First, typename Second>
- struct VectorTraits<pair<First, Second> >
+ struct VectorTraits<std::pair<First, Second> >
{
typedef VectorTraits<First> FirstTraits;
typedef VectorTraits<Second> SecondTraits;
Modified: trunk/Source/WebCore/platform/CrossThreadCopier.cpp (155401 => 155402)
--- trunk/Source/WebCore/platform/CrossThreadCopier.cpp 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.cpp 2013-09-09 23:37:43 UTC (rev 155402)
@@ -73,17 +73,17 @@
class CopierThreadSafeRefCountedTest : public ThreadSafeRefCounted<CopierThreadSafeRefCountedTest> {
};
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<PassRefPtr<CopierThreadSafeRefCountedTest> >::Type
>::value),
PassRefPtrTest);
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<RefPtr<CopierThreadSafeRefCountedTest> >::Type
>::value),
RefPtrTest);
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<CopierThreadSafeRefCountedTest*>::Type
>::value),
@@ -99,33 +99,33 @@
class CopierRefCountedTest : public RefCounted<CopierRefCountedTest> {
};
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
int,
CrossThreadCopier<PassRefPtr<CopierRefCountedTest> >::Type
>::value),
PassRefPtrRefCountedTest);
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
int,
CrossThreadCopier<RefPtr<CopierRefCountedTest> >::Type
>::value),
RefPtrRefCountedTest);
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
int,
CrossThreadCopier<CopierRefCountedTest*>::Type
>::value),
RawPointerRefCountedTest);
// Verify that PassOwnPtr gets passed through.
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
PassOwnPtr<float>,
CrossThreadCopier<PassOwnPtr<float> >::Type
>::value),
PassOwnPtrTest);
// Verify that PassOwnPtr does not get passed through.
-COMPILE_ASSERT((WTF::IsSameType<
+COMPILE_ASSERT((std::is_same<
int,
CrossThreadCopier<OwnPtr<float> >::Type
>::value),
Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h (155401 => 155402)
--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h 2013-09-09 23:37:43 UTC (rev 155402)
@@ -154,7 +154,7 @@
}
};
-template<typename T> struct ArgumentCoder<Vector<T>> : VectorArgumentCoder<WTF::IsArithmetic<T>::value, T> { };
+template<typename T> struct ArgumentCoder<Vector<T>> : VectorArgumentCoder<std::is_arithmetic<T>::value, T> { };
template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> struct ArgumentCoder<HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>> {
typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> HashMapType;
Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h (155401 => 155402)
--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h 2013-09-09 23:04:51 UTC (rev 155401)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h 2013-09-09 23:37:43 UTC (rev 155402)
@@ -63,7 +63,7 @@
template<typename T> bool decodeEnum(T& result)
{
- COMPILE_ASSERT(sizeof(T) <= sizeof(uint64_t), enum_type_must_not_be_larger_than_64_bits);
+ static_assert(sizeof(T) <= 8, "Enum type T must not be larger than 64 bits!");
uint64_t value;
if (!decode(value))
@@ -76,8 +76,8 @@
template<typename T>
bool bufferIsLargeEnoughToContain(size_t numElements) const
{
- COMPILE_ASSERT(WTF::IsArithmetic<T>::value, type_must_have_known_encoded_size);
-
+ static_assert(std::is_arithmetic<T>::value, "Type T must have a fixed, known encoded size!");
+
if (numElements > std::numeric_limits<size_t>::max() / sizeof(T))
return false;