Platform.h is out of control Part 8: Macros are used inconsistently
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jan 2020 04:01:50 +0000 (04:01 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jan 2020 04:01:50 +0000 (04:01 +0000)
commit71ddab431fdec28ee27c7eb597aa4a6ce369922a
treeff67de27f38d3dda80f8a3e9be25910f9e41507c
parentc7e3aaf0d86738269778049748bf7eb92dc7bc44
Platform.h is out of control Part 8: Macros are used inconsistently
https://bugs.webkit.org/show_bug.cgi?id=206425

Reviewed by Darin Adler.

Source/bmalloc:

* bmalloc/BPlatform.h:
Update OS_EFFECTIVE_ADDRESS_WIDTH to match WTF definition, add needed OS macros.

Source/JavaScriptCore:

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::cacheFlush):
(JSC::ARM64Assembler::xOrSp):
(JSC::ARM64Assembler::xOrZr):
* assembler/ARM64Registers.h:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::cacheFlush):
* assembler/ARMv7Registers.h:
* assembler/AssemblerCommon.h:
(JSC::isDarwin):
* b3/air/AirCCallingConvention.cpp:
* jit/ExecutableAllocator.h:
* jit/ThunkGenerators.cpp:
* jsc.cpp:
* runtime/MathCommon.cpp:
Use OS(DARWIN) more consistently for darwin level functionality.

* bytecode/CodeOrigin.h:
* runtime/JSString.h:
Update to use OS_CONSTANT.

* disassembler/ARM64/A64DOpcode.cpp:
* disassembler/ARM64Disassembler.cpp:
* disassembler/UDis86Disassembler.cpp:
* disassembler/UDis86Disassembler.h:
* disassembler/X86Disassembler.cpp:
* disassembler/udis86/udis86.c:
* disassembler/udis86/udis86_decode.c:
* disassembler/udis86/udis86_itab_holder.c:
* disassembler/udis86/udis86_syn-att.c:
* disassembler/udis86/udis86_syn-intel.c:
* disassembler/udis86/udis86_syn.c:
* interpreter/Interpreter.cpp:
* interpreter/Interpreter.h:
* interpreter/InterpreterInlines.h:
(JSC::Interpreter::getOpcodeID):
* llint/LowLevelInterpreter.cpp:
* tools/SigillCrashAnalyzer.cpp:
Switch to using ENABLE rather than USE for features internal to WebKit

Source/WTF:

Start addressing FIXMEs added to Platform.h (and helper files) during previous
cleanup work.

- Renames WTF_CPU_EFFECTIVE_ADDRESS_WIDTH to WTF_OS_CONSTANT_EFFECTIVE_ADDRESS_WIDTH,
  making it available via new macro OS_CONSTANT(...), and syncs bmalloc redefinition.
- Renames:
     USE_LLINT_EMBEDDED_OPCODE_ID to ENABLE_LLINT_EMBEDDED_OPCODE_ID
     USE_UDIS86 to ENABLE_UDIS86
     USE_ARM64_DISASSEMBLER to ENABLE_ARM64_DISASSEMBLER
  Enable is more appropriate here as these enable functionality within webkit.
- Removes undefs that are no longer needed due to only defining the macro once now.
- Removes dead defined(__LP64__) check after PLATFORM(MAC) macOS is always 64-bit these
  days.

* wtf/Packed.h:
(WTF::alignof):
* wtf/Platform.h:
* wtf/PlatformEnable.h:
* wtf/PlatformOS.h:
* wtf/WTFAssertions.cpp:
* wtf/text/StringCommon.h:

Tools:

* TestWebKitAPI/Tests/WTF/Packed.cpp:
(TestWebKitAPI::TEST):
Update to use OS_CONSTANT.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/ARM64Assembler.h
Source/JavaScriptCore/assembler/ARM64Registers.h
Source/JavaScriptCore/assembler/ARMv7Assembler.h
Source/JavaScriptCore/assembler/ARMv7Registers.h
Source/JavaScriptCore/assembler/AssemblerCommon.h
Source/JavaScriptCore/b3/air/AirCCallingConvention.cpp
Source/JavaScriptCore/bytecode/CodeOrigin.h
Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp
Source/JavaScriptCore/disassembler/ARM64Disassembler.cpp
Source/JavaScriptCore/disassembler/UDis86Disassembler.cpp
Source/JavaScriptCore/disassembler/UDis86Disassembler.h
Source/JavaScriptCore/disassembler/X86Disassembler.cpp
Source/JavaScriptCore/disassembler/udis86/udis86.c
Source/JavaScriptCore/disassembler/udis86/udis86_decode.c
Source/JavaScriptCore/disassembler/udis86/udis86_itab_holder.c
Source/JavaScriptCore/disassembler/udis86/udis86_syn-att.c
Source/JavaScriptCore/disassembler/udis86/udis86_syn-intel.c
Source/JavaScriptCore/disassembler/udis86/udis86_syn.c
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/interpreter/Interpreter.h
Source/JavaScriptCore/interpreter/InterpreterInlines.h
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jit/ThunkGenerators.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/MathCommon.cpp
Source/JavaScriptCore/tools/SigillCrashAnalyzer.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/Packed.h
Source/WTF/wtf/Platform.h
Source/WTF/wtf/PlatformEnable.h
Source/WTF/wtf/PlatformOS.h
Source/WTF/wtf/WTFAssertions.cpp
Source/WTF/wtf/text/StringCommon.h
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/BPlatform.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/Packed.cpp