Changeset 236450 in webkit


Ignore:
Timestamp:
Sep 24, 2018, 8:05:13 PM (7 years ago)
Author:
Fujii Hironori
Message:

Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
https://bugs.webkit.org/show_bug.cgi?id=189733

Reviewed by Michael Catanzaro.

Source/bmalloc:

  • bmalloc/BCompiler.h:

Source/JavaScriptCore:

  • assembler/ARM64Assembler.h:
  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::cacheFlush):

  • assembler/MacroAssemblerARM.cpp:

(JSC::isVFPPresent):

  • assembler/MacroAssemblerARM64.cpp:
  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerMIPS.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • heap/HeapCell.cpp:
  • heap/HeapCell.h:
  • jit/HostCallReturnValue.h:
  • jit/JIT.h:
  • jit/JITOperations.cpp:
  • jit/ThunkGenerators.cpp:
  • runtime/ArrayConventions.cpp:

(JSC::clearArrayMemset):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::digitDiv):

Source/WebCore:

No new tests (No behavior change).

  • platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
  • platform/graphics/cpu/arm/filters/FELightingNEON.h:
  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::platformApply):

  • platform/graphics/filters/FELighting.h:

Source/WTF:

Clang for Windows build enables WTF_COMPILER_CLANG and
WTF_COMPILER_MSVC, but disables WTF_COMPILER_GCC_OR_CLANG. It is
strange WTF_COMPILER_GCC_OR_CLANG is not enabled even though
WTF_COMPILER_CLANG is enabled. However, Clang for Windows imitates
MSVC, and codes for COMPILER(GCC_OR_CLANG) are for non MSVC. At
least at the moment, it is not feasible to define
WTF_COMPILER_GCC_OR_CLANG for Clang for Windows.

To solve the issue, this change renames WTF_COMPILER_GCC_OR_CLANG
to WTF_COMPILER_GCC_COMPATIBLE.

As an exception, I'd like to use IGNORE_WARNINGS_* macros even in
Clang for Windows builds.

  • wtf/Assertions.cpp: Replaced COMPILER(GCC_OR_CLANG) with COMPILER(GCC_COMPATIBLE).
  • wtf/Assertions.h: Ditto.
  • wtf/Atomics.h: Ditto.
  • wtf/CheckedArithmetic.h: Ditto.
  • wtf/FastMalloc.h: Ditto.
  • wtf/MathExtras.h: Ditto.
  • wtf/Platform.h: Ditto.
  • wtf/StdLibExtras.h: Ditto.
  • wtf/Vector.h: Ditto.
  • wtf/text/ASCIIFastPath.h: Ditto.
wtf/Compiler.h: Ditto. Replaced "COMPILER(GCC_OR_CLANG)" with "COMPILER(GCC)
COMPILER(CLANG)" of IGNORE_WARNINGS_* macros.
Location:
trunk/Source
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r236437 r236450  
     12018-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
     4        https://bugs.webkit.org/show_bug.cgi?id=189733
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * assembler/ARM64Assembler.h:
     9        * assembler/ARMAssembler.h:
     10        (JSC::ARMAssembler::cacheFlush):
     11        * assembler/MacroAssemblerARM.cpp:
     12        (JSC::isVFPPresent):
     13        * assembler/MacroAssemblerARM64.cpp:
     14        * assembler/MacroAssemblerARMv7.cpp:
     15        * assembler/MacroAssemblerMIPS.cpp:
     16        * assembler/MacroAssemblerX86Common.cpp:
     17        * heap/HeapCell.cpp:
     18        * heap/HeapCell.h:
     19        * jit/HostCallReturnValue.h:
     20        * jit/JIT.h:
     21        * jit/JITOperations.cpp:
     22        * jit/ThunkGenerators.cpp:
     23        * runtime/ArrayConventions.cpp:
     24        (JSC::clearArrayMemset):
     25        * runtime/JSBigInt.cpp:
     26        (JSC::JSBigInt::digitDiv):
     27
    1282018-09-24  Saam Barati  <sbarati@apple.com>
    229
  • trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h

    r234984 r236450  
    28532853    unsigned debugOffset() { return m_buffer.debugOffset(); }
    28542854
    2855 #if OS(LINUX) && COMPILER(GCC_OR_CLANG)
     2855#if OS(LINUX) && COMPILER(GCC_COMPATIBLE)
    28562856    static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
    28572857    {
  • trunk/Source/JavaScriptCore/assembler/ARMAssembler.h

    r234984 r236450  
    11651165        }
    11661166
    1167 #if OS(LINUX) && COMPILER(GCC_OR_CLANG)
     1167#if OS(LINUX) && COMPILER(GCC_COMPATIBLE)
    11681168        static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
    11691169        {
     
    11851185        static void cacheFlush(void* code, size_t size)
    11861186        {
    1187 #if OS(LINUX) && COMPILER(GCC_OR_CLANG)
     1187#if OS(LINUX) && COMPILER(GCC_COMPATIBLE)
    11881188            size_t page = pageSize();
    11891189            uintptr_t current = reinterpret_cast<uintptr_t>(code);
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp

    r221002 r236450  
    6161#endif // OS(LINUX)
    6262
    63 #if (COMPILER(GCC_OR_CLANG) && defined(__VFP_FP__))
     63#if (COMPILER(GCC_COMPATIBLE) && defined(__VFP_FP__))
    6464    return true;
    6565#else
     
    104104using namespace ARMRegisters;
    105105
    106 #if COMPILER(GCC_OR_CLANG)
     106#if COMPILER(GCC_COMPATIBLE)
    107107
    108108// The following are offsets for Probe::State fields accessed
     
    428428    "pop       { pc }" "\n"
    429429);
    430 #endif // COMPILER(GCC_OR_CLANG)
     430#endif // COMPILER(GCC_COMPATIBLE)
    431431
    432432void MacroAssembler::probe(Probe::Function function, void* arg)
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.cpp

    r231118 r236450  
    4545using namespace ARM64Registers;
    4646
    47 #if COMPILER(GCC_OR_CLANG)
     47#if COMPILER(GCC_COMPATIBLE)
    4848
    4949// The following are offsets for Probe::State fields accessed
     
    510510    "ret" "\n"
    511511);
    512 #endif // COMPILER(GCC_OR_CLANG)
     512#endif // COMPILER(GCC_COMPATIBLE)
    513513
    514514void MacroAssembler::probe(Probe::Function function, void* arg)
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.cpp

    r221002 r236450  
    4040using namespace ARMRegisters;
    4141
    42 #if COMPILER(GCC_OR_CLANG)
     42#if COMPILER(GCC_COMPATIBLE)
    4343
    4444// The following are offsets for Probe::State fields accessed
     
    366366    "pop       { pc }" "\n"
    367367);
    368 #endif // COMPILER(GCC_OR_CLANG)
     368#endif // COMPILER(GCC_COMPATIBLE)
    369369
    370370void MacroAssembler::probe(Probe::Function function, void* arg)
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.cpp

    r231554 r236450  
    4141using namespace MIPSRegisters;
    4242
    43 #if COMPILER(GCC_OR_CLANG)
     43#if COMPILER(GCC_COMPATIBLE)
    4444
    4545// The following are offsets for Probe::State fields accessed
     
    551551    ".set pop" "\n"
    552552);
    553 #endif // COMPILER(GCC_OR_CLANG)
     553#endif // COMPILER(GCC_COMPATIBLE)
    554554
    555555void MacroAssembler::probe(Probe::Function function, void* arg)
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp

    r229988 r236450  
    172172
    173173#if CPU(X86)
    174 #if COMPILER(GCC_OR_CLANG)
     174#if COMPILER(GCC_COMPATIBLE)
    175175asm (
    176176    ".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n"
     
    512512
    513513#if CPU(X86_64)
    514 #if COMPILER(GCC_OR_CLANG)
     514#if COMPILER(GCC_COMPATIBLE)
    515515asm (
    516516    ".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n"
     
    706706    "ret" "\n"
    707707);
    708 #endif // COMPILER(GCC_OR_CLANG)
     708#endif // COMPILER(GCC_COMPATIBLE)
    709709#endif // CPU(X86_64)
    710710
  • trunk/Source/JavaScriptCore/heap/HeapCell.cpp

    r233236 r236450  
    4343}
    4444
    45 #if !COMPILER(GCC_OR_CLANG)
     45#if !COMPILER(GCC_COMPATIBLE)
    4646void HeapCell::use() const
    4747{
  • trunk/Source/JavaScriptCore/heap/HeapCell.h

    r233236 r236450  
    7878    // need to use this, but it might be necessary if you're otherwise referring to an object's innards
    7979    // but not the object itself.
    80 #if COMPILER(GCC_OR_CLANG)
     80#if COMPILER(GCC_COMPATIBLE)
    8181    void use() const
    8282    {
  • trunk/Source/JavaScriptCore/jit/HostCallReturnValue.cpp

    r236381 r236450  
    4848}
    4949
    50 #if COMPILER(GCC_OR_CLANG) && CPU(X86_64)
     50#if COMPILER(GCC_COMPATIBLE) && CPU(X86_64)
    5151asm (
    5252".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     
    5757);
    5858
    59 #elif COMPILER(GCC_OR_CLANG) && CPU(X86)
     59#elif COMPILER(GCC_COMPATIBLE) && CPU(X86)
    6060asm (
    6161".text" "\n" \
     
    7373);
    7474
    75 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2)
     75#elif COMPILER(GCC_COMPATIBLE) && CPU(ARM_THUMB2)
    7676asm (
    7777".text" "\n"
     
    8686);
    8787
    88 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL)
     88#elif COMPILER(GCC_COMPATIBLE) && CPU(ARM_TRADITIONAL)
    8989asm (
    9090".text" "\n"
     
    108108);
    109109
    110 #elif COMPILER(GCC_OR_CLANG) && CPU(MIPS)
     110#elif COMPILER(GCC_COMPATIBLE) && CPU(MIPS)
    111111
    112112#if WTF_MIPS_PIC
  • trunk/Source/JavaScriptCore/jit/HostCallReturnValue.h

    r236381 r236450  
    4040extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() REFERENCED_FROM_ASM WTF_INTERNAL;
    4141
    42 #if COMPILER(GCC_OR_CLANG)
     42#if COMPILER(GCC_COMPATIBLE)
    4343
    4444// This is a public declaration only to convince CLANG not to elide it.
     
    5050}
    5151
    52 #else // COMPILER(GCC_OR_CLANG)
     52#else // COMPILER(GCC_COMPATIBLE)
    5353
    5454inline void initializeHostCallReturnValue() { }
    5555
    56 #endif // COMPILER(GCC_OR_CLANG)
     56#endif // COMPILER(GCC_COMPATIBLE)
    5757
    5858} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r232444 r236450  
    3030// We've run into some problems where changing the size of the class JIT leads to
    3131// performance fluctuations. Try forcing alignment in an attempt to stabilize this.
    32 #if COMPILER(GCC_OR_CLANG)
     32#if COMPILER(GCC_COMPATIBLE)
    3333#define JIT_CLASS_ALIGNMENT alignas(32)
    3434#else
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r236381 r236450  
    24632463    auto scope = DECLARE_THROW_SCOPE(*vm);
    24642464    UNUSED_PARAM(scope);
    2465 #if COMPILER(GCC_OR_CLANG)
     2465#if COMPILER(GCC_COMPATIBLE)
    24662466    void* returnPC = __builtin_return_address(0);
    24672467    doExceptionFuzzing(exec, scope, "JITOperations", returnPC);
    2468 #endif // COMPILER(GCC_OR_CLANG)
     2468#endif // COMPILER(GCC_COMPATIBLE)
    24692469}
    24702470
  • trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp

    r232568 r236450  
    773773typedef MathThunkCallingConvention(*MathThunk)(MathThunkCallingConvention);
    774774
    775 #if CPU(X86_64) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
     775#if CPU(X86_64) && COMPILER(GCC_COMPATIBLE) && (OS(DARWIN) || OS(LINUX))
    776776
    777777#define defineUnaryDoubleOpWrapper(function) \
     
    791791    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    792792
    793 #elif CPU(X86) && COMPILER(GCC_OR_CLANG) && OS(LINUX) && defined(__PIC__)
     793#elif CPU(X86) && COMPILER(GCC_COMPATIBLE) && OS(LINUX) && defined(__PIC__)
    794794#define defineUnaryDoubleOpWrapper(function) \
    795795    asm( \
     
    815815    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    816816
    817 #elif CPU(X86) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
     817#elif CPU(X86) && COMPILER(GCC_COMPATIBLE) && (OS(DARWIN) || OS(LINUX))
    818818#define defineUnaryDoubleOpWrapper(function) \
    819819    asm( \
     
    835835    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    836836
    837 #elif CPU(ARM_THUMB2) && COMPILER(GCC_OR_CLANG) && PLATFORM(IOS)
     837#elif CPU(ARM_THUMB2) && COMPILER(GCC_COMPATIBLE) && PLATFORM(IOS)
    838838
    839839#define defineUnaryDoubleOpWrapper(function) \
  • trunk/Source/JavaScriptCore/runtime/ArrayConventions.cpp

    r228576 r236450  
    3434void clearArrayMemset(WriteBarrier<Unknown>* base, unsigned count)
    3535{
    36 #if CPU(X86_64) && COMPILER(GCC_OR_CLANG)
     36#if CPU(X86_64) && COMPILER(GCC_COMPATIBLE)
    3737    uint64_t zero = 0;
    3838    asm volatile (
     
    4949void clearArrayMemset(double* base, unsigned count)
    5050{
    51 #if CPU(X86_64) && COMPILER(GCC_OR_CLANG)
     51#if CPU(X86_64) && COMPILER(GCC_COMPATIBLE)
    5252    uint64_t pnan = bitwise_cast<uint64_t>(PNaN);
    5353    asm volatile (
  • trunk/Source/JavaScriptCore/runtime/JSBigInt.cpp

    r233765 r236450  
    469469{
    470470    ASSERT(high < divisor);
    471 #if CPU(X86_64) && COMPILER(GCC_OR_CLANG)
     471#if CPU(X86_64) && COMPILER(GCC_COMPATIBLE)
    472472    Digit quotient;
    473473    Digit rem;
     
    480480    remainder = rem;
    481481    return quotient;
    482 #elif CPU(X86) && COMPILER(GCC_OR_CLANG)
     482#elif CPU(X86) && COMPILER(GCC_COMPATIBLE)
    483483    Digit quotient;
    484484    Digit rem;
  • trunk/Source/WTF/ChangeLog

    r236381 r236450  
     12018-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
     4        https://bugs.webkit.org/show_bug.cgi?id=189733
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Clang for Windows build enables WTF_COMPILER_CLANG and
     9        WTF_COMPILER_MSVC, but disables WTF_COMPILER_GCC_OR_CLANG. It is
     10        strange WTF_COMPILER_GCC_OR_CLANG is not enabled even though
     11        WTF_COMPILER_CLANG is enabled. However, Clang for Windows imitates
     12        MSVC, and codes for COMPILER(GCC_OR_CLANG) are for non MSVC. At
     13        least at the moment, it is not feasible to define
     14        WTF_COMPILER_GCC_OR_CLANG for Clang for Windows.
     15
     16        To solve the issue, this change renames WTF_COMPILER_GCC_OR_CLANG
     17        to WTF_COMPILER_GCC_COMPATIBLE.
     18
     19        As an exception, I'd like to use IGNORE_WARNINGS_* macros even in
     20        Clang for Windows builds.
     21
     22        * wtf/Assertions.cpp: Replaced COMPILER(GCC_OR_CLANG) with COMPILER(GCC_COMPATIBLE).
     23        * wtf/Assertions.h: Ditto.
     24        * wtf/Atomics.h: Ditto.
     25        * wtf/CheckedArithmetic.h: Ditto.
     26        * wtf/FastMalloc.h: Ditto.
     27        * wtf/MathExtras.h: Ditto.
     28        * wtf/Platform.h: Ditto.
     29        * wtf/StdLibExtras.h: Ditto.
     30        * wtf/Vector.h: Ditto.
     31        * wtf/text/ASCIIFastPath.h: Ditto.
     32        * wtf/Compiler.h:  Ditto. Replaced "COMPILER(GCC_OR_CLANG)" with "COMPILER(GCC) || COMPILER(CLANG)" of IGNORE_WARNINGS_* macros.
     33
    1342018-09-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
    235
  • trunk/Source/WTF/wtf/Assertions.cpp

    r235935 r236450  
    255255    *(int *)(uintptr_t)0xbbadbeef = 0;
    256256    // More reliable, but doesn't say BBADBEEF.
    257 #if COMPILER(GCC_OR_CLANG)
     257#if COMPILER(GCC_COMPATIBLE)
    258258    __builtin_trap();
    259259#else
    260260    ((void(*)())0)();
    261 #endif // COMPILER(GCC_OR_CLANG)
     261#endif // COMPILER(GCC_COMPATIBLE)
    262262#endif // ASAN_ENABLED
    263263}
  • trunk/Source/WTF/wtf/Assertions.h

    r235935 r236450  
    5656
    5757#if OS(WINDOWS)
    58 #if !COMPILER(GCC_OR_CLANG)
     58#if !COMPILER(GCC_COMPATIBLE)
    5959extern "C" void _ReadWriteBarrier(void);
    6060#pragma intrinsic(_ReadWriteBarrier)
     
    103103#endif
    104104
    105 #if COMPILER(GCC_OR_CLANG)
     105#if COMPILER(GCC_COMPATIBLE)
    106106#define WTF_PRETTY_FUNCTION __PRETTY_FUNCTION__
    107107#else
     
    112112/* By default MinGW emits warnings when C99 format attributes are used, even if __USE_MINGW_ANSI_STDIO is defined */
    113113#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(gnu_printf, formatStringArgument, extraArguments)))
    114 #elif COMPILER(GCC_OR_CLANG) && !defined(__OBJC__)
     114#elif COMPILER(GCC_COMPATIBLE) && !defined(__OBJC__)
    115115/* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute
    116116   emits a warning when %@ is used in the format string.  Until <rdar://problem/5195437> is resolved we can't include
     
    142142   Signals are ignored by the crash reporter on OS X so we must do better.
    143143*/
    144 #if COMPILER(GCC_OR_CLANG) || COMPILER(MSVC)
     144#if COMPILER(GCC_COMPATIBLE) || COMPILER(MSVC)
    145145#define NO_RETURN_DUE_TO_CRASH NO_RETURN
    146146#else
     
    565565inline void compilerFenceForCrash()
    566566{
    567 #if OS(WINDOWS) && !COMPILER(GCC_OR_CLANG)
     567#if OS(WINDOWS) && !COMPILER(GCC_COMPATIBLE)
    568568    _ReadWriteBarrier();
    569569#else
  • trunk/Source/WTF/wtf/Atomics.h

    r234648 r236450  
    3131
    3232#if OS(WINDOWS)
    33 #if !COMPILER(GCC_OR_CLANG)
     33#if !COMPILER(GCC_COMPATIBLE)
    3434extern "C" void _ReadWriteBarrier(void);
    3535#pragma intrinsic(_ReadWriteBarrier)
     
    243243inline void compilerFence()
    244244{
    245 #if OS(WINDOWS) && !COMPILER(GCC_OR_CLANG)
     245#if OS(WINDOWS) && !COMPILER(GCC_COMPATIBLE)
    246246    _ReadWriteBarrier();
    247247#else
  • trunk/Source/WTF/wtf/CheckedArithmetic.h

    r234251 r236450  
    271271    static inline bool add(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    272272    {
    273 #if COMPILER(GCC_OR_CLANG)
     273#if COMPILER(GCC_COMPATIBLE)
    274274        ResultType temp;
    275275        if (__builtin_add_overflow(lhs, rhs, &temp))
     
    295295    static inline bool sub(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    296296    {
    297 #if COMPILER(GCC_OR_CLANG)
     297#if COMPILER(GCC_COMPATIBLE)
    298298        ResultType temp;
    299299        if (__builtin_sub_overflow(lhs, rhs, &temp))
     
    318318    static inline bool multiply(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    319319    {
    320 #if COMPILER(GCC_OR_CLANG)
     320#if COMPILER(GCC_COMPATIBLE)
    321321        ResultType temp;
    322322        if (__builtin_mul_overflow(lhs, rhs, &temp))
     
    357357    static inline bool add(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    358358    {
    359 #if COMPILER(GCC_OR_CLANG)
     359#if COMPILER(GCC_COMPATIBLE)
    360360        ResultType temp;
    361361        if (__builtin_add_overflow(lhs, rhs, &temp))
     
    374374    static inline bool sub(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    375375    {
    376 #if COMPILER(GCC_OR_CLANG)
     376#if COMPILER(GCC_COMPATIBLE)
    377377        ResultType temp;
    378378        if (__builtin_sub_overflow(lhs, rhs, &temp))
     
    391391    static inline bool multiply(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
    392392    {
    393 #if COMPILER(GCC_OR_CLANG)
     393#if COMPILER(GCC_COMPATIBLE)
    394394        ResultType temp;
    395395        if (__builtin_mul_overflow(lhs, rhs, &temp))
     
    416416    static inline bool add(int64_t lhs, int64_t rhs, ResultType& result)
    417417    {
    418 #if COMPILER(GCC_OR_CLANG)
     418#if COMPILER(GCC_COMPATIBLE)
    419419        ResultType temp;
    420420        if (__builtin_add_overflow(lhs, rhs, &temp))
     
    435435    static inline bool sub(int64_t lhs, int64_t rhs, ResultType& result)
    436436    {
    437 #if COMPILER(GCC_OR_CLANG)
     437#if COMPILER(GCC_COMPATIBLE)
    438438        ResultType temp;
    439439        if (__builtin_sub_overflow(lhs, rhs, &temp))
     
    454454    static inline bool multiply(int64_t lhs, int64_t rhs, ResultType& result)
    455455    {
    456 #if COMPILER(GCC_OR_CLANG)
     456#if COMPILER(GCC_COMPATIBLE)
    457457        ResultType temp;
    458458        if (__builtin_mul_overflow(lhs, rhs, &temp))
  • trunk/Source/WTF/wtf/Compiler.h

    r236302 r236450  
    8282#endif // defined(__clang__)
    8383
    84 /* COMPILER(GCC_OR_CLANG) - GNU Compiler Collection or Clang */
     84/* COMPILER(GCC_COMPATIBLE) - GNU Compiler Collection or compatibles */
    8585#if defined(__GNUC__)
    86 #define WTF_COMPILER_GCC_OR_CLANG 1
     86#define WTF_COMPILER_GCC_COMPATIBLE 1
    8787#endif
    8888
    8989/* COMPILER(GCC) - GNU Compiler Collection */
    9090/* Note: This section must come after the Clang section since we check !COMPILER(CLANG) here. */
    91 #if COMPILER(GCC_OR_CLANG) && !COMPILER(CLANG)
     91#if COMPILER(GCC_COMPATIBLE) && !COMPILER(CLANG)
    9292#define WTF_COMPILER_GCC 1
    9393
     
    101101#endif /* COMPILER(GCC) */
    102102
    103 #if COMPILER(GCC_OR_CLANG) && defined(NDEBUG) && !defined(__OPTIMIZE__) && !defined(RELEASE_WITHOUT_OPTIMIZATIONS)
     103#if COMPILER(GCC_COMPATIBLE) && defined(NDEBUG) && !defined(__OPTIMIZE__) && !defined(RELEASE_WITHOUT_OPTIMIZATIONS)
    104104#error "Building release without compiler optimizations: WebKit will be slow. Set -DRELEASE_WITHOUT_OPTIMIZATIONS if this is intended."
    105105#endif
     
    164164/* In GCC functions marked with no_sanitize_address cannot call functions that are marked with always_inline and not marked with no_sanitize_address.
    165165 * Therefore we need to give up on the enforcement of ALWAYS_INLINE when bulding with ASAN. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 */
    166 #if !defined(ALWAYS_INLINE) && COMPILER(GCC_OR_CLANG) && defined(NDEBUG) && !COMPILER(MINGW) && !(COMPILER(GCC) && ASAN_ENABLED)
     166#if !defined(ALWAYS_INLINE) && COMPILER(GCC_COMPATIBLE) && defined(NDEBUG) && !COMPILER(MINGW) && !(COMPILER(GCC) && ASAN_ENABLED)
    167167#define ALWAYS_INLINE inline __attribute__((__always_inline__))
    168168#endif
     
    220220/* LIKELY */
    221221
    222 #if !defined(LIKELY) && COMPILER(GCC_OR_CLANG)
     222#if !defined(LIKELY) && COMPILER(GCC_COMPATIBLE)
    223223#define LIKELY(x) __builtin_expect(!!(x), 1)
    224224#endif
     
    230230/* NEVER_INLINE */
    231231
    232 #if !defined(NEVER_INLINE) && COMPILER(GCC_OR_CLANG)
     232#if !defined(NEVER_INLINE) && COMPILER(GCC_COMPATIBLE)
    233233#define NEVER_INLINE __attribute__((__noinline__))
    234234#endif
     
    244244/* NO_RETURN */
    245245
    246 #if !defined(NO_RETURN) && COMPILER(GCC_OR_CLANG)
     246#if !defined(NO_RETURN) && COMPILER(GCC_COMPATIBLE)
    247247#define NO_RETURN __attribute((__noreturn__))
    248248#endif
     
    269269
    270270/* RETURNS_NONNULL */
    271 #if !defined(RETURNS_NONNULL) && COMPILER(GCC_OR_CLANG)
     271#if !defined(RETURNS_NONNULL) && COMPILER(GCC_COMPATIBLE)
    272272#define RETURNS_NONNULL __attribute__((returns_nonnull))
    273273#endif
     
    311311/* PURE_FUNCTION */
    312312
    313 #if !defined(PURE_FUNCTION) && COMPILER(GCC_OR_CLANG)
     313#if !defined(PURE_FUNCTION) && COMPILER(GCC_COMPATIBLE)
    314314#define PURE_FUNCTION __attribute__((__pure__))
    315315#endif
     
    321321/* UNUSED_FUNCTION */
    322322
    323 #if !defined(UNUSED_FUNCTION) && COMPILER(GCC_OR_CLANG)
     323#if !defined(UNUSED_FUNCTION) && COMPILER(GCC_COMPATIBLE)
    324324#define UNUSED_FUNCTION __attribute__((unused))
    325325#endif
     
    331331/* REFERENCED_FROM_ASM */
    332332
    333 #if !defined(REFERENCED_FROM_ASM) && COMPILER(GCC_OR_CLANG)
     333#if !defined(REFERENCED_FROM_ASM) && COMPILER(GCC_COMPATIBLE)
    334334#define REFERENCED_FROM_ASM __attribute__((__used__))
    335335#endif
     
    341341/* UNLIKELY */
    342342
    343 #if !defined(UNLIKELY) && COMPILER(GCC_OR_CLANG)
     343#if !defined(UNLIKELY) && COMPILER(GCC_COMPATIBLE)
    344344#define UNLIKELY(x) __builtin_expect(!!(x), 0)
    345345#endif
     
    370370/* WARN_UNUSED_RETURN */
    371371
    372 #if !defined(WARN_UNUSED_RETURN) && COMPILER(GCC_OR_CLANG)
     372#if !defined(WARN_UNUSED_RETURN) && COMPILER(GCC_COMPATIBLE)
    373373#define WARN_UNUSED_RETURN __attribute__((__warn_unused_result__))
    374374#endif
     
    393393#define _COMPILER_WARNING_NAME(warning) "-W" warning
    394394
    395 #if COMPILER(GCC_OR_CLANG)
     395#if COMPILER(GCC) || COMPILER(CLANG)
    396396#define IGNORE_WARNINGS_BEGIN_COND(cond, compiler, warning) \
    397397    _Pragma(_COMPILER_STRINGIZE(compiler diagnostic push)) \
     
    416416    _IGNORE_WARNINGS_BEGIN_IMPL(compiler, _COMPILER_WARNING_NAME(warning))
    417417
    418 #endif // COMPILER(GCC_OR_CLANG)
     418#endif // COMPILER(GCC) || COMPILER(CLANG)
    419419
    420420
     
    435435#endif
    436436
    437 #if COMPILER(GCC_OR_CLANG)
     437#if COMPILER(GCC) || COMPILER(CLANG)
    438438#define IGNORE_WARNINGS_BEGIN(warning) IGNORE_WARNINGS_BEGIN_IMPL(GCC, warning)
    439439#define IGNORE_WARNINGS_END IGNORE_WARNINGS_END_IMPL(GCC)
  • trunk/Source/WTF/wtf/FastMalloc.h

    r232269 r236450  
    251251using WTF::fastAlignedFree;
    252252
    253 #if COMPILER(GCC_OR_CLANG) && OS(DARWIN)
     253#if COMPILER(GCC_COMPATIBLE) && OS(DARWIN)
    254254#define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline))
    255 #elif COMPILER(GCC_OR_CLANG)
     255#elif COMPILER(GCC_COMPATIBLE)
    256256#define WTF_PRIVATE_INLINE inline __attribute__((always_inline))
    257257#elif COMPILER(MSVC)
  • trunk/Source/WTF/wtf/MathExtras.h

    r234768 r236450  
    527527inline unsigned clz32(uint32_t number)
    528528{
    529 #if COMPILER(GCC_OR_CLANG)
     529#if COMPILER(GCC_COMPATIBLE)
    530530    if (number)
    531531        return __builtin_clz(number);
     
    552552inline unsigned clz64(uint64_t number)
    553553{
    554 #if COMPILER(GCC_OR_CLANG)
     554#if COMPILER(GCC_COMPATIBLE)
    555555    if (number)
    556556        return __builtin_clzll(number);
  • trunk/Source/WTF/wtf/Platform.h

    r236381 r236450  
    328328#endif
    329329
    330 #if COMPILER(GCC_OR_CLANG)
     330#if COMPILER(GCC_COMPATIBLE)
    331331/* __LP64__ is not defined on 64bit Windows since it uses LLP64. Using __SIZEOF_POINTER__ is simpler. */
    332332#if __SIZEOF_POINTER__ == 8
     
    438438/* CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
    439439
    440 #if COMPILER(GCC_OR_CLANG)
     440#if COMPILER(GCC_COMPATIBLE)
    441441#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    442442#define WTF_CPU_BIG_ENDIAN 1
     
    913913#if CPU(X86) && COMPILER(MSVC)
    914914#define JSC_HOST_CALL __fastcall
    915 #elif CPU(X86) && COMPILER(GCC_OR_CLANG)
     915#elif CPU(X86) && COMPILER(GCC_COMPATIBLE)
    916916#define JSC_HOST_CALL __attribute__ ((fastcall))
    917917#else
     
    952952
    953953/* Configure the interpreter */
    954 #if COMPILER(GCC_OR_CLANG)
     954#if COMPILER(GCC_COMPATIBLE)
    955955#define HAVE_COMPUTED_GOTO 1
    956956#endif
  • trunk/Source/WTF/wtf/StdLibExtras.h

    r232932 r236450  
    8282 * - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43976
    8383 */
    84 #if (CPU(ARM) || CPU(MIPS)) && COMPILER(GCC_OR_CLANG)
     84#if (CPU(ARM) || CPU(MIPS)) && COMPILER(GCC_COMPATIBLE)
    8585template<typename Type>
    8686inline bool isPointerTypeAlignmentOkay(Type* ptr)
     
    169169template<typename T, size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
    170170// GCC needs some help to deduce a 0 length array.
    171 #if COMPILER(GCC_OR_CLANG)
     171#if COMPILER(GCC_COMPATIBLE)
    172172template<typename T> char (&ArrayLengthHelperFunction(T (&)[0]))[0];
    173173#endif
  • trunk/Source/WTF/wtf/Vector.h

    r235935 r236450  
    202202    {
    203203        static_assert(sizeof(T) == 1, "Size of type T should be equal to one!");
    204 #if COMPILER(GCC_OR_CLANG) && defined(_FORTIFY_SOURCE)
     204#if COMPILER(GCC_COMPATIBLE) && defined(_FORTIFY_SOURCE)
    205205        if (!__builtin_constant_p(dstEnd - dst) || (!(dstEnd - dst)))
    206206#endif
  • trunk/Source/WTF/wtf/text/ASCIIFastPath.h

    r228022 r236450  
    140140        destination[i] = static_cast<LChar>(source[i]);
    141141    }
    142 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM64) && !defined(__ILP32__) && defined(NDEBUG)
     142#elif COMPILER(GCC_COMPATIBLE) && CPU(ARM64) && !defined(__ILP32__) && defined(NDEBUG)
    143143    const LChar* const end = destination + length;
    144144    const uintptr_t memoryAccessSize = 16;
     
    161161    while (destination != end)
    162162        *destination++ = static_cast<LChar>(*source++);
    163 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_NEON) && !(CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)) && defined(NDEBUG)
     163#elif COMPILER(GCC_COMPATIBLE) && CPU(ARM_NEON) && !(CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)) && defined(NDEBUG)
    164164    const LChar* const end = destination + length;
    165165    const uintptr_t memoryAccessSize = 8;
  • trunk/Source/WebCore/ChangeLog

    r236448 r236450  
     12018-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
     4        https://bugs.webkit.org/show_bug.cgi?id=189733
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        No new tests (No behavior change).
     9
     10        * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
     11        * platform/graphics/cpu/arm/filters/FELightingNEON.h:
     12        * platform/graphics/filters/FELighting.cpp:
     13        (WebCore::FELighting::platformApply):
     14        * platform/graphics/filters/FELighting.h:
     15
    1162018-09-24  John Wilander  <wilander@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp

    r230380 r236450  
    2828#include "FELightingNEON.h"
    2929
    30 #if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_OR_CLANG)
     30#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
    3131
    3232namespace WebCore {
     
    501501} // namespace WebCore
    502502
    503 #endif // CPU(ARM_NEON) && COMPILER(GCC_OR_CLANG)
     503#endif // CPU(ARM_NEON) && COMPILER(GCC_COMPATIBLE)
  • trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h

    r236391 r236450  
    2828#define FELightingNEON_h
    2929
    30 #if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_OR_CLANG)
     30#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
    3131
    3232#include "FELighting.h"
     
    197197} // namespace WebCore
    198198
    199 #endif // CPU(ARM_NEON) && COMPILER(GCC_OR_CLANG)
     199#endif // CPU(ARM_NEON) && COMPILER(GCC_COMPATIBLE)
    200200
    201201#endif // FELightingNEON_h
  • trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp

    r231559 r236450  
    381381{
    382382    // The selection here eventually should happen dynamically on some platforms.
    383 #if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_OR_CLANG)
     383#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
    384384    platformApplyNeon(data, paintingData);
    385385#else
  • trunk/Source/WebCore/platform/graphics/filters/FELighting.h

    r228218 r236450  
    148148    void platformApplyGeneric(const LightingData&, const LightSource::PaintingData&);
    149149
    150 #if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_OR_CLANG)
     150#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
    151151    static int getPowerCoefficients(float exponent);
    152152    inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&);
  • trunk/Source/bmalloc/ChangeLog

    r235412 r236450  
     12018-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
     4        https://bugs.webkit.org/show_bug.cgi?id=189733
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * bmalloc/BCompiler.h:
     9
    1102018-08-27  Keith Rollin  <krollin@apple.com>
    211
  • trunk/Source/bmalloc/bmalloc/BCompiler.h

    r232599 r236450  
    3939#define BASAN_ENABLED BCOMPILER_HAS_CLANG_FEATURE(address_sanitizer)
    4040
    41 /* BCOMPILER(GCC_OR_CLANG) - GNU Compiler Collection or Clang */
     41/* BCOMPILER(GCC_COMPATIBLE) - GNU Compiler Collection or compatibles */
    4242
    4343#if defined(__GNUC__)
    44 #define BCOMPILER_GCC_OR_CLANG 1
     44#define BCOMPILER_GCC_COMPATIBLE 1
    4545#endif
    4646
    4747/* BNO_RETURN */
    4848
    49 #if !defined(BNO_RETURN) && BCOMPILER(GCC_OR_CLANG)
     49#if !defined(BNO_RETURN) && BCOMPILER(GCC_COMPATIBLE)
    5050#define BNO_RETURN __attribute((__noreturn__))
    5151#endif
Note: See TracChangeset for help on using the changeset viewer.