Skip to content

Commit ef5e3f5

Browse files
committed
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. Canonical link: https://commits.webkit.org/204902@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e698ff5 commit ef5e3f5

36 files changed

Lines changed: 177 additions & 93 deletions

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
2018-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+
128
2018-09-24 Saam Barati <sbarati@apple.com>
229

330
Array.prototype.indexOf fast path needs to ensure the length is still valid after performing effects

‎Source/JavaScriptCore/assembler/ARM64Assembler.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,7 @@ class ARM64Assembler {
28522852

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
{
28582858
__builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));

‎Source/JavaScriptCore/assembler/ARMAssembler.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ namespace JSC {
11641164
return AL | B | (offset & BranchOffsetMask);
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
{
11701170
asm volatile(
@@ -1184,7 +1184,7 @@ namespace JSC {
11841184

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);
11901190
uintptr_t end = current + size;

‎Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static bool isVFPPresent()
6060
}
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
6666
return false;
@@ -103,7 +103,7 @@ extern "C" void ctiMasmProbeTrampoline();
103103

104104
using 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
109109
// by the ctiMasmProbeTrampoline stub.
@@ -427,7 +427,7 @@ asm (
427427
"ldr sp, [sp, #" STRINGIZE_VALUE_OF(PROBE_CPU_SP_OFFSET) "]" "\n"
428428
"pop { pc }" "\n"
429429
);
430-
#endif // COMPILER(GCC_OR_CLANG)
430+
#endif // COMPILER(GCC_COMPATIBLE)
431431
432432
void MacroAssembler::probe(Probe::Function function, void* arg)
433433
{

‎Source/JavaScriptCore/assembler/MacroAssemblerARM64.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern "C" void ctiMasmProbeTrampoline();
4444

4545
using 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
5050
// by the ctiMasmProbeTrampoline stub.
@@ -509,7 +509,7 @@ asm (
509509
"ldp x29, x30, [sp], #" STRINGIZE_VALUE_OF(2 * PTR_SIZE) "\n"
510510
"ret" "\n"
511511
);
512-
#endif // COMPILER(GCC_OR_CLANG)
512+
#endif // COMPILER(GCC_COMPATIBLE)
513513
514514
void MacroAssembler::probe(Probe::Function function, void* arg)
515515
{

‎Source/JavaScriptCore/assembler/MacroAssemblerARMv7.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern "C" void ctiMasmProbeTrampoline();
3939

4040
using 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
4545
// by the ctiMasmProbeTrampoline stub.
@@ -365,7 +365,7 @@ asm (
365365
"ldr sp, [sp, #" STRINGIZE_VALUE_OF(PROBE_CPU_SP_OFFSET) "]" "\n"
366366
"pop { pc }" "\n"
367367
);
368-
#endif // COMPILER(GCC_OR_CLANG)
368+
#endif // COMPILER(GCC_COMPATIBLE)
369369
370370
void MacroAssembler::probe(Probe::Function function, void* arg)
371371
{

‎Source/JavaScriptCore/assembler/MacroAssemblerMIPS.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern "C" void ctiMasmProbeTrampoline();
4040

4141
using 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
4646
// by the ctiMasmProbeTrampoline stub.
@@ -550,7 +550,7 @@ asm (
550550
"nop" "\n"
551551
".set pop" "\n"
552552
);
553-
#endif // COMPILER(GCC_OR_CLANG)
553+
#endif // COMPILER(GCC_COMPATIBLE)
554554

555555
void MacroAssembler::probe(Probe::Function function, void* arg)
556556
{

‎Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static_assert((PROBE_EXECUTOR_OFFSET + PTR_SIZE) <= (PROBE_SIZE + OUT_SIZE), "Mu
171171
#undef PROBE_OFFSETOF
172172

173173
#if CPU(X86)
174-
#if COMPILER(GCC_OR_CLANG)
174+
#if COMPILER(GCC_COMPATIBLE)
175175
asm (
176176
".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n"
177177
HIDE_SYMBOL(ctiMasmProbeTrampoline) "\n"
@@ -511,7 +511,7 @@ extern "C" __declspec(naked) void ctiMasmProbeTrampoline()
511511
#endif // CPU(X86)
512512

513513
#if CPU(X86_64)
514-
#if COMPILER(GCC_OR_CLANG)
514+
#if COMPILER(GCC_COMPATIBLE)
515515
asm (
516516
".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n"
517517
HIDE_SYMBOL(ctiMasmProbeTrampoline) "\n"
@@ -705,7 +705,7 @@ asm (
705705
"popq %rbp" "\n"
706706
"ret" "\n"
707707
);
708-
#endif // COMPILER(GCC_OR_CLANG)
708+
#endif // COMPILER(GCC_COMPATIBLE)
709709
#endif // CPU(X86_64)
710710

711711
// What code is emitted for the probe?

‎Source/JavaScriptCore/heap/HeapCell.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bool HeapCell::isLive()
4242
return markedBlockHandle.isLive(this);
4343
}
4444

45-
#if !COMPILER(GCC_OR_CLANG)
45+
#if !COMPILER(GCC_COMPATIBLE)
4646
void HeapCell::use() const
4747
{
4848
}

‎Source/JavaScriptCore/heap/HeapCell.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class HeapCell {
7777
// Call use() after the last point where you need `this` pointer to be kept alive. You usually don't
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
{
8383
asm volatile ("" : : "r"(this) : "memory");

0 commit comments

Comments
 (0)