Ignore:
Timestamp:
Jan 20, 2020, 8:01:50 PM (5 years ago)
Author:
[email protected]
Message:

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.

Location:
trunk/Source/JavaScriptCore/disassembler
Files:
11 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.