Title: [128900] trunk/Source
- Revision
- 128900
- Author
- [email protected]
- Date
- 2012-09-18 09:13:11 -0700 (Tue, 18 Sep 2012)
Log Message
Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
https://bugs.webkit.org/show_bug.cgi?id=96980
Reviewed by Benjamin Poulain.
Source/_javascript_Core:
* runtime/JSCell.h:
(JSC):
(NeedsDestructor):
Source/WTF:
* wtf/TypeTraits.h:
(WTF):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (128899 => 128900)
--- trunk/Source/_javascript_Core/ChangeLog 2012-09-18 15:30:27 UTC (rev 128899)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-09-18 16:13:11 UTC (rev 128900)
@@ -1,3 +1,14 @@
+2012-09-18 Mark Hahnenberg <[email protected]>
+
+ Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
+ https://bugs.webkit.org/show_bug.cgi?id=96980
+
+ Reviewed by Benjamin Poulain.
+
+ * runtime/JSCell.h:
+ (JSC):
+ (NeedsDestructor):
+
2012-09-18 Filip Pizlo <[email protected]>
DFGOperations doesn't use NativeCallFrameTracer in enough places
Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (128899 => 128900)
--- trunk/Source/_javascript_Core/runtime/JSCell.h 2012-09-18 15:30:27 UTC (rev 128899)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h 2012-09-18 16:13:11 UTC (rev 128900)
@@ -33,6 +33,7 @@
#include "SlotVisitorInlineMethods.h"
#include "WriteBarrier.h"
#include <wtf/Noncopyable.h>
+#include <wtf/TypeTraits.h>
namespace JSC {
@@ -308,18 +309,10 @@
return isCell() ? asCell()->toObject(exec, globalObject) : toObjectSlowCase(exec, globalObject);
}
-#if COMPILER(CLANG)
template<class T>
struct NeedsDestructor {
- static const bool value = !__has_trivial_destructor(T);
+ static const bool value = !WTF::HasTrivialDestructor<T>::value;
};
-#else
- // Write manual specializations for this struct template if you care about non-clang compilers.
- template<class T>
- struct NeedsDestructor {
- static const bool value = true;
- };
-#endif
template<typename T>
void* allocateCell(Heap& heap)
Modified: trunk/Source/WTF/ChangeLog (128899 => 128900)
--- trunk/Source/WTF/ChangeLog 2012-09-18 15:30:27 UTC (rev 128899)
+++ trunk/Source/WTF/ChangeLog 2012-09-18 16:13:11 UTC (rev 128900)
@@ -1,3 +1,13 @@
+2012-09-18 Mark Hahnenberg <[email protected]>
+
+ Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
+ https://bugs.webkit.org/show_bug.cgi?id=96980
+
+ Reviewed by Benjamin Poulain.
+
+ * wtf/TypeTraits.h:
+ (WTF):
+
2012-09-17 Glenn Adams <[email protected]>
Including HexNumber.h fails build if hexDigitsForMode is not referenced
Modified: trunk/Source/WTF/wtf/TypeTraits.h (128899 => 128900)
--- trunk/Source/WTF/wtf/TypeTraits.h 2012-09-18 15:30:27 UTC (rev 128899)
+++ trunk/Source/WTF/wtf/TypeTraits.h 2012-09-18 16:13:11 UTC (rev 128900)
@@ -251,7 +251,7 @@
typedef IntegralConstant<bool, true> true_type;
typedef IntegralConstant<bool, false> false_type;
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER)
+#if COMPILER(CLANG) || (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 <typename T> struct HasTrivialConstructor : public IntegralConstant<bool, __has_trivial_constructor(T)>{ };
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes