Changeset 128900 in webkit


Ignore:
Timestamp:
Sep 18, 2012 9:13:11 AM (12 years ago)
Author:
mhahnenberg@apple.com
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/JavaScriptCore:

  • runtime/JSCell.h:

(JSC):
(NeedsDestructor):

Source/WTF:

  • wtf/TypeTraits.h:

(WTF):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r128898 r128900  
     12012-09-18  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
     4        https://bugs.webkit.org/show_bug.cgi?id=96980
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * runtime/JSCell.h:
     9        (JSC):
     10        (NeedsDestructor):
     11
    1122012-09-18  Filip Pizlo  <fpizlo@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r128851 r128900  
    3434#include "WriteBarrier.h"
    3535#include <wtf/Noncopyable.h>
     36#include <wtf/TypeTraits.h>
    3637
    3738namespace JSC {
     
    309310    }
    310311
    311 #if COMPILER(CLANG)
    312312    template<class T>
    313313    struct NeedsDestructor {
    314         static const bool value = !__has_trivial_destructor(T);
     314        static const bool value = !WTF::HasTrivialDestructor<T>::value;
    315315    };
    316 #else
    317     // Write manual specializations for this struct template if you care about non-clang compilers.
    318     template<class T>
    319     struct NeedsDestructor {
    320         static const bool value = true;
    321     };
    322 #endif
    323316
    324317    template<typename T>
  • trunk/Source/WTF/ChangeLog

    r128829 r128900  
     12012-09-18  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
     4        https://bugs.webkit.org/show_bug.cgi?id=96980
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * wtf/TypeTraits.h:
     9        (WTF):
     10
    1112012-09-17  Glenn Adams  <glenn@skynav.com>
    212
  • trunk/Source/WTF/wtf/TypeTraits.h

    r115893 r128900  
    252252    typedef IntegralConstant<bool, false> false_type;
    253253
    254 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER)
     254#if COMPILER(CLANG) || (defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER))
    255255    // VC8 (VS2005) and later have built-in compiler support for HasTrivialConstructor / HasTrivialDestructor,
    256256    // but for some unexplained reason it doesn't work on built-in types.
Note: See TracChangeset for help on using the changeset viewer.