Changeset 187819 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Aug 3, 2015, 11:51:29 PM (10 years ago)
Author:
Csaba Osztrogonác
Message:

Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
https://bugs.webkit.org/show_bug.cgi?id=146833

Reviewed by Alexey Proskuryakov.

Source/JavaScriptCore:

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

(JSC::ARMAssembler::cacheFlush):

  • assembler/MacroAssemblerARM.cpp:

(JSC::isVFPPresent):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::isSSE2Present):

  • heap/MachineStackMarker.h:
  • interpreter/StackVisitor.cpp: Removed redundant COMPILER(CLANG) guards.

(JSC::logF):

  • jit/HostCallReturnValue.h:
  • jit/JIT.h:
  • jit/JITOperations.cpp:
  • jit/JITStubsARM.h:
  • jit/JITStubsARMv7.h:
  • jit/JITStubsX86.h:
  • jit/JITStubsX86Common.h:
  • jit/JITStubsX86_64.h:
  • jit/ThunkGenerators.cpp:
  • runtime/JSExportMacros.h:
  • runtime/MathCommon.h: Removed redundant COMPILER(CLANG) guard.

(JSC::clz32):

Source/WebCore:

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

(WebCore::FELighting::platformApply):

  • platform/network/efl/NetworkStateNotifierEfl.cpp:

(WebCore::NetworkStateNotifier::readSocketCallback):

Source/WTF:

  • wtf/Assertions.cpp:
  • wtf/Assertions.h: Removed redundant COMPILER(CLANG) guard.
  • wtf/Atomics.cpp:
  • wtf/Atomics.h:

(WTF::weakCompareAndSwap):
(WTF::compilerFence):

  • wtf/Compiler.h:
    • Renamed COMPILER(GCC) to COMPILER(GCC_OR_CLANG), because it is true for both compiler.
    • Added COMPILER(GCC) which is true only for GCC.
    • Moved all GCC related stuff to one block and removed redundant guards accordingly.
    • Removed the unused default false definition of GCC_VERSION_AT_LEAST for non GCC compilers.
  • wtf/ExportMacros.h:
  • wtf/FastMalloc.h:
  • wtf/Platform.h:
  • wtf/StdLibExtras.h:
  • wtf/Vector.h:
  • wtf/text/ASCIIFastPath.h:

(WTF::copyLCharsFromUCharSource):

Location:
trunk/Source/JavaScriptCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r187794 r187819  
     12015-08-03  Csaba Osztrogonác  <[email protected]>
     2
     3        Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
     4        https://bugs.webkit.org/show_bug.cgi?id=146833
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * assembler/ARM64Assembler.h:
     9        * assembler/ARMAssembler.h:
     10        (JSC::ARMAssembler::cacheFlush):
     11        * assembler/MacroAssemblerARM.cpp:
     12        (JSC::isVFPPresent):
     13        * assembler/MacroAssemblerX86Common.h:
     14        (JSC::MacroAssemblerX86Common::isSSE2Present):
     15        * heap/MachineStackMarker.h:
     16        * interpreter/StackVisitor.cpp: Removed redundant COMPILER(CLANG) guards.
     17        (JSC::logF):
     18        * jit/HostCallReturnValue.h:
     19        * jit/JIT.h:
     20        * jit/JITOperations.cpp:
     21        * jit/JITStubsARM.h:
     22        * jit/JITStubsARMv7.h:
     23        * jit/JITStubsX86.h:
     24        * jit/JITStubsX86Common.h:
     25        * jit/JITStubsX86_64.h:
     26        * jit/ThunkGenerators.cpp:
     27        * runtime/JSExportMacros.h:
     28        * runtime/MathCommon.h: Removed redundant COMPILER(CLANG) guard.
     29        (JSC::clz32):
     30
    1312015-08-03  Filip Pizlo  <[email protected]>
    232
  • trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h

    r184170 r187819  
    28522852    unsigned debugOffset() { return m_buffer.debugOffset(); }
    28532853
    2854 #if OS(LINUX) && COMPILER(GCC)
     2854#if OS(LINUX) && COMPILER(GCC_OR_CLANG)
    28552855    static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
    28562856    {
  • trunk/Source/JavaScriptCore/assembler/ARMAssembler.h

    r181570 r187819  
    10921092        }
    10931093
    1094 #if OS(LINUX) && COMPILER(GCC)
     1094#if OS(LINUX) && COMPILER(GCC_OR_CLANG)
    10951095        static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
    10961096        {
     
    11121112        static void cacheFlush(void* code, size_t size)
    11131113        {
    1114 #if OS(LINUX) && COMPILER(GCC)
     1114#if OS(LINUX) && COMPILER(GCC_OR_CLANG)
    11151115            size_t page = pageSize();
    11161116            uintptr_t current = reinterpret_cast<uintptr_t>(code);
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp

    r176233 r187819  
    5959#endif // OS(LINUX)
    6060
    61 #if (COMPILER(GCC) && defined(__VFP_FP__))
     61#if (COMPILER(GCC_OR_CLANG) && defined(__VFP_FP__))
    6262    return true;
    6363#else
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h

    r183963 r187819  
    15781578                mov flags, edx;
    15791579            }
    1580 #elif COMPILER(GCC)
     1580#elif COMPILER(GCC_OR_CLANG)
    15811581            asm (
    15821582                 "movl $0x1, %%eax;"
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.h

    r181060 r187819  
    7070} // namespace JSC
    7171
    72 #if COMPILER(GCC)
     72#if COMPILER(GCC_OR_CLANG)
    7373#define REGISTER_BUFFER_ALIGNMENT __attribute__ ((aligned (sizeof(void*))))
    7474#else
  • trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp

    r182934 r187819  
    332332    printIndents(indent);
    333333
    334 #if COMPILER(CLANG) || COMPILER(GCC)
     334#if COMPILER(GCC_OR_CLANG)
    335335#pragma GCC diagnostic push
    336336#pragma GCC diagnostic ignored "-Wformat-nonliteral"
     
    340340    dataLogF(format, values...);
    341341
    342 #if COMPILER(CLANG) || COMPILER(GCC)
     342#if COMPILER(GCC_OR_CLANG)
    343343#pragma GCC diagnostic pop
    344344#endif
  • trunk/Source/JavaScriptCore/jit/HostCallReturnValue.h

    r164424 r187819  
    4242extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() REFERENCED_FROM_ASM WTF_INTERNAL;
    4343
    44 #if COMPILER(GCC)
     44#if COMPILER(GCC_OR_CLANG)
    4545
    4646// This is a public declaration only to convince CLANG not to elide it.
     
    5252}
    5353
    54 #else // COMPILER(GCC)
     54#else // COMPILER(GCC_OR_CLANG)
    5555
    5656inline void initializeHostCallReturnValue() { }
    5757
    58 #endif // COMPILER(GCC)
     58#endif // COMPILER(GCC_OR_CLANG)
    5959
    6060} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r187012 r187819  
    3131// We've run into some problems where changing the size of the class JIT leads to
    3232// performance fluctuations.  Try forcing alignment in an attempt to stabalize this.
    33 #if COMPILER(GCC)
     33#if COMPILER(GCC_OR_CLANG)
    3434#define JIT_CLASS_ALIGNMENT __attribute__ ((aligned (32)))
    3535#else
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r187750 r187819  
    19231923void JIT_OPERATION operationExceptionFuzz()
    19241924{
    1925 #if COMPILER(GCC)
     1925#if COMPILER(GCC_OR_CLANG)
    19261926    ExecState* exec = static_cast<ExecState*>(__builtin_frame_address(1));
    19271927    void* returnPC = __builtin_return_address(0);
    19281928    doExceptionFuzzing(exec, "JITOperations", returnPC);
    1929 #endif // COMPILER(GCC)
     1929#endif // COMPILER(GCC_OR_CLANG)
    19301930}
    19311931
     
    19931993}
    19941994
    1995 #if COMPILER(GCC) && CPU(X86_64)
     1995#if COMPILER(GCC_OR_CLANG) && CPU(X86_64)
    19961996asm (
    19971997".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     
    20022002);
    20032003
    2004 #elif COMPILER(GCC) && CPU(X86)
     2004#elif COMPILER(GCC_OR_CLANG) && CPU(X86)
    20052005asm (
    20062006".text" "\n" \
     
    20172017);
    20182018
    2019 #elif COMPILER(GCC) && CPU(ARM_THUMB2)
     2019#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2)
    20202020asm (
    20212021".text" "\n"
     
    20302030);
    20312031
    2032 #elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
     2032#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL)
    20332033asm (
    20342034".text" "\n"
     
    20522052);
    20532053
    2054 #elif COMPILER(GCC) && CPU(MIPS)
     2054#elif COMPILER(GCC_OR_CLANG) && CPU(MIPS)
    20552055
    20562056#if WTF_MIPS_PIC
     
    20742074);
    20752075
    2076 #elif COMPILER(GCC) && CPU(SH4)
     2076#elif COMPILER(GCC_OR_CLANG) && CPU(SH4)
    20772077
    20782078#define SH4_SCRATCH_REGISTER "r11"
  • trunk/Source/JavaScriptCore/jit/JITStubsARM.h

    r176031 r187819  
    4242namespace JSC {
    4343
    44 #if COMPILER(GCC)
     44#if COMPILER(GCC_OR_CLANG)
    4545
    4646#if ENABLE(MASM_PROBE)
     
    296296
    297297
    298 #endif // COMPILER(GCC)
     298#endif // COMPILER(GCC_OR_CLANG)
    299299
    300300} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITStubsARMv7.h

    r176134 r187819  
    4242namespace JSC {
    4343
    44 #if COMPILER(GCC)
     44#if COMPILER(GCC_OR_CLANG)
    4545
    4646#if ENABLE(MASM_PROBE)
     
    328328#endif // ENABLE(MASM_PROBE)
    329329
    330 #endif // COMPILER(GCC)
     330#endif // COMPILER(GCC_OR_CLANG)
    331331
    332332} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITStubsX86.h

    r176095 r187819  
    4444namespace JSC {
    4545
    46 #if COMPILER(GCC)
     46#if COMPILER(GCC_OR_CLANG)
    4747
    4848#if ENABLE(MASM_PROBE)
     
    199199#endif // ENABLE(MASM_PROBE)
    200200
    201 #endif // COMPILER(GCC)
     201#endif // COMPILER(GCC_OR_CLANG)
    202202
    203203} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITStubsX86Common.h

    r176095 r187819  
    3535namespace JSC {
    3636
    37 #if COMPILER(GCC)
     37#if COMPILER(GCC_OR_CLANG)
    3838
    3939#if ENABLE(MASM_PROBE)
     
    158158#endif // ENABLE(MASM_PROBE)
    159159
    160 #endif // COMPILER(GCC)
     160#endif // COMPILER(GCC_OR_CLANG)
    161161
    162162} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITStubsX86_64.h

    r176095 r187819  
    4444namespace JSC {
    4545
    46 #if COMPILER(GCC)
     46#if COMPILER(GCC_OR_CLANG)
    4747
    4848#if ENABLE(MASM_PROBE)
     
    228228#endif // ENABLE(MASM_PROBE)
    229229
    230 #endif // COMPILER(GCC)
     230#endif // COMPILER(GCC_OR_CLANG)
    231231
    232232} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp

    r187505 r187819  
    635635typedef MathThunkCallingConvention(*MathThunk)(MathThunkCallingConvention);
    636636
    637 #if CPU(X86_64) && COMPILER(GCC) && (OS(DARWIN) || OS(LINUX))
     637#if CPU(X86_64) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
    638638
    639639#define defineUnaryDoubleOpWrapper(function) \
     
    653653    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    654654
    655 #elif CPU(X86) && COMPILER(GCC) && OS(LINUX) && defined(__PIC__)
     655#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && OS(LINUX) && defined(__PIC__)
    656656#define defineUnaryDoubleOpWrapper(function) \
    657657    asm( \
     
    677677    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    678678
    679 #elif CPU(X86) && COMPILER(GCC) && (OS(DARWIN) || OS(LINUX))
     679#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
    680680#define defineUnaryDoubleOpWrapper(function) \
    681681    asm( \
     
    697697    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
    698698
    699 #elif CPU(ARM_THUMB2) && COMPILER(GCC) && PLATFORM(IOS)
     699#elif CPU(ARM_THUMB2) && COMPILER(GCC_OR_CLANG) && PLATFORM(IOS)
    700700
    701701#define defineUnaryDoubleOpWrapper(function) \
  • trunk/Source/JavaScriptCore/runtime/JSExportMacros.h

    r165676 r187819  
    4848#else // !USE(EXPORT_MACROS)
    4949
    50 #if OS(WINDOWS) && !COMPILER(GCC)
     50#if OS(WINDOWS) && !COMPILER(GCC_OR_CLANG)
    5151
    5252#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore)
  • trunk/Source/JavaScriptCore/runtime/MathCommon.h

    r183963 r187819  
    3838inline int clz32(uint32_t number)
    3939{
    40 #if COMPILER(GCC) || COMPILER(CLANG)
     40#if COMPILER(GCC_OR_CLANG)
    4141    int zeroCount = 32;
    4242    if (number)
Note: See TracChangeset for help on using the changeset viewer.