Diff
Modified: trunk/Source/WTF/ChangeLog (254543 => 254544)
--- trunk/Source/WTF/ChangeLog 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/ChangeLog 2020-01-15 00:26:56 UTC (rev 254544)
@@ -1,3 +1,22 @@
+2020-01-14 Sam Weinig <[email protected]>
+
+ Plaform.h helper files should have a consistent naming scheme
+ https://bugs.webkit.org/show_bug.cgi?id=206240
+
+ Reviewed by Dean Jackson.
+
+ Rename Plaform.h helper files to use the prefix "Platform" consistently.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/CPU.h: Removed.
+ * wtf/FeatureDefines.h: Removed.
+ * wtf/OS.h: Removed.
+ * wtf/Platform.h:
+ * wtf/PlatformCPU.h: Copied from Source/WTF/wtf/CPU.h.
+ * wtf/PlatformEnable.h: Copied from Source/WTF/wtf/FeatureDefines.h.
+ * wtf/PlatformOS.h: Copied from Source/WTF/wtf/OS.h.
+
2020-01-14 Myles C. Maxfield <[email protected]>
[Cocoa] Glyph lookup should be language-sensitive (specifically between Yiddish and Hebrew)
Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (254543 => 254544)
--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-01-15 00:26:56 UTC (rev 254544)
@@ -444,9 +444,10 @@
7C137942222326D500D7A824 /* ieee.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ieee.h; sourceTree = "<group>"; };
7C137943222326D500D7A824 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
7C3F72391D78811900674E26 /* Brigand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Brigand.h; sourceTree = "<group>"; };
- 7C8B633023CAC76D00BB4620 /* OS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OS.h; sourceTree = "<group>"; };
+ 7C42307123CE2D8A006E54D0 /* PlatformEnable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEnable.h; sourceTree = "<group>"; };
+ 7C42307223CE2D8A006E54D0 /* PlatformCPU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCPU.h; sourceTree = "<group>"; };
+ 7C42307323CE2D8B006E54D0 /* PlatformOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformOS.h; sourceTree = "<group>"; };
7C9692941F66306E00267A9E /* KeyValuePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyValuePair.h; sourceTree = "<group>"; };
- 7CA842E923C98CB700514CAF /* CPU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPU.h; sourceTree = "<group>"; };
7CBBA07319BB7FDC00BBF025 /* OSObjectPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSObjectPtr.h; sourceTree = "<group>"; };
7CD0D5A71D55322A000CC9E1 /* Variant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Variant.h; sourceTree = "<group>"; };
7CD4C26F1E2C82B900929470 /* StringConcatenateNumbers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringConcatenateNumbers.h; sourceTree = "<group>"; };
@@ -661,7 +662,6 @@
AD89B6B91E64150F0090707F /* MemoryPressureHandlerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryPressureHandlerCocoa.mm; sourceTree = "<group>"; };
ADF2CE641E39F106006889DB /* MemoryFootprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryFootprint.h; sourceTree = "<group>"; };
ADF2CE651E39F106006889DB /* MemoryFootprintCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryFootprintCocoa.cpp; sourceTree = "<group>"; };
- B38FD7BC168953E80065C969 /* FeatureDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeatureDefines.h; sourceTree = "<group>"; };
C2BCFC3E1F61D13000C9222C /* Language.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Language.cpp; sourceTree = "<group>"; };
C2BCFC3F1F61D13000C9222C /* Language.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Language.h; sourceTree = "<group>"; };
C2BCFC411F61D61600C9222C /* LanguageCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LanguageCF.cpp; sourceTree = "<group>"; };
@@ -956,7 +956,6 @@
0FDB698D1B7C643A000C1078 /* Condition.h */,
0F8E85DA1FD485B000691889 /* CountingLock.cpp */,
0FFBCBFA1FD37E0F0072AAF0 /* CountingLock.h */,
- 7CA842E923C98CB700514CAF /* CPU.h */,
E38C41261EB4E0680042957D /* CPUTime.cpp */,
E38C41271EB4E0680042957D /* CPUTime.h */,
515F794B1CFC9F4A00CCED93 /* CrossThreadCopier.cpp */,
@@ -995,7 +994,6 @@
A8A472A1151A825A004123FF /* FastMalloc.cpp */,
A8A472A2151A825A004123FF /* FastMalloc.h */,
0F79C7C31E73511800EB34D1 /* FastTLS.h */,
- B38FD7BC168953E80065C969 /* FeatureDefines.h */,
A331D95821F24978009F02AA /* FileMetadata.h */,
0F9D335B165DBA73005AD387 /* FilePrintStream.cpp */,
0F9D335C165DBA73005AD387 /* FilePrintStream.h */,
@@ -1107,7 +1105,6 @@
1A4656181C7FC68E00F5920F /* OptionSet.h */,
275DFB6B238BDF72001230E2 /* OptionSetHash.h */,
0F9495831C571CC900413A48 /* OrderMaker.h */,
- 7C8B633023CAC76D00BB4620 /* OS.h */,
A8A472D7151A825B004123FF /* OSAllocator.h */,
7CBBA07319BB7FDC00BBF025 /* OSObjectPtr.h */,
A8A472DA151A825B004123FF /* OSRandomSource.cpp */,
@@ -1128,6 +1125,9 @@
0F824A641B7443A0002E345D /* ParkingLot.cpp */,
0F824A651B7443A0002E345D /* ParkingLot.h */,
A876DBD7151816E500DADB95 /* Platform.h */,
+ 7C42307223CE2D8A006E54D0 /* PlatformCPU.h */,
+ 7C42307123CE2D8A006E54D0 /* PlatformEnable.h */,
+ 7C42307323CE2D8B006E54D0 /* PlatformOS.h */,
FE1E2C41224187C600F6B729 /* PlatformRegisters.cpp */,
E3200AB41E9A536D003B59D2 /* PlatformRegisters.h */,
0FF860941BCCBD740045127F /* PointerComparison.h */,
Modified: trunk/Source/WTF/wtf/CMakeLists.txt (254543 => 254544)
--- trunk/Source/WTF/wtf/CMakeLists.txt 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2020-01-15 00:26:56 UTC (rev 254544)
@@ -21,7 +21,6 @@
BubbleSort.h
BumpPointerAllocator.h
ByteOrder.h
- CPU.h
CPUTime.h
CagedPtr.h
CagedUniquePtr.h
@@ -64,7 +63,6 @@
FastBitVector.h
FastMalloc.h
FastTLS.h
- FeatureDefines.h
FileMetadata.h
FilePrintStream.h
FileSystem.h
@@ -149,7 +147,6 @@
Nonmovable.h
NotFound.h
NumberOfCores.h
- OS.h
OSAllocator.h
OSObjectPtr.h
OSRandomSource.h
@@ -174,6 +171,9 @@
ParallelVectorIterator.h
ParkingLot.h
Platform.h
+ PlatformCPU.h
+ PlatformEnable.h
+ PlatformOS.h
PlatformRegisters.h
PointerComparison.h
PointerPreparations.h
Deleted: trunk/Source/WTF/wtf/CPU.h (254543 => 254544)
--- trunk/Source/WTF/wtf/CPU.h 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/wtf/CPU.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -1,363 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-/* Include compiler specific macros */
-#include <wtf/Compiler.h>
-
-/* CPU() - the target CPU architecture */
-#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
-
-/* ==== CPU() - the target CPU architecture ==== */
-/* CPU(KNOWN) becomes true if we explicitly support a target CPU. */
-
-/* CPU(MIPS) - MIPS 32-bit and 64-bit */
-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64))
-#if defined(_ABI64) && (_MIPS_SIM == _ABI64)
-#define WTF_CPU_MIPS64 1
-#define WTF_MIPS_ARCH __mips64
-#else
-#define WTF_CPU_MIPS 1
-#define WTF_MIPS_ARCH __mips
-#endif
-#define WTF_CPU_KNOWN 1
-#define WTF_MIPS_PIC (defined __PIC__)
-#define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
-#define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
-#define WTF_MIPS_ARCH_REV __mips_isa_rev
-#define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
-#define WTF_MIPS_ISA_REV_AT_LEAST(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV >= v)
-#define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
-#define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
-#endif
-
-/* CPU(PPC64) - PowerPC 64-bit Big Endian */
-#if ( defined(__ppc64__) \
- || defined(__PPC64__)) \
- && defined(__BYTE_ORDER__) \
- && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#define WTF_CPU_PPC64 1
-#define WTF_CPU_KNOWN 1
-#endif
-
-/* CPU(PPC64LE) - PowerPC 64-bit Little Endian */
-#if ( defined(__ppc64__) \
- || defined(__PPC64__) \
- || defined(__ppc64le__) \
- || defined(__PPC64LE__)) \
- && defined(__BYTE_ORDER__) \
- && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
-#define WTF_CPU_PPC64LE 1
-#define WTF_CPU_KNOWN 1
-#endif
-
-/* CPU(PPC) - PowerPC 32-bit */
-#if ( defined(__ppc__) \
- || defined(__PPC__) \
- || defined(__powerpc__) \
- || defined(__powerpc) \
- || defined(__POWERPC__) \
- || defined(_M_PPC) \
- || defined(__PPC)) \
- && !CPU(PPC64) \
- && CPU(BIG_ENDIAN)
-#define WTF_CPU_PPC 1
-#define WTF_CPU_KNOWN 1
-#endif
-
-/* CPU(X86) - i386 / x86 32-bit */
-#if defined(__i386__) \
- || defined(i386) \
- || defined(_M_IX86) \
- || defined(_X86_) \
- || defined(__THW_INTEL)
-#define WTF_CPU_X86 1
-#define WTF_CPU_KNOWN 1
-
-#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
-#define WTF_CPU_X86_SSE2 1
-#endif
-
-#endif
-
-/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
-#if defined(__x86_64__) \
- || defined(_M_X64)
-#define WTF_CPU_X86_64 1
-#define WTF_CPU_X86_SSE2 1
-#define WTF_CPU_KNOWN 1
-#endif
-
-/* CPU(ARM64) - Apple */
-#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
-#define WTF_CPU_ARM64 1
-#define WTF_CPU_KNOWN 1
-
-#if defined(__arm64e__)
-#define WTF_CPU_ARM64E 1
-#endif
-#endif
-
-/* CPU(ARM) - ARM, any version*/
-#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
-
-#if defined(arm) \
- || defined(__arm__) \
- || defined(ARM) \
- || defined(_ARM_)
-#define WTF_CPU_ARM 1
-#define WTF_CPU_KNOWN 1
-
-#if defined(__ARM_PCS_VFP)
-#define WTF_CPU_ARM_HARDFP 1
-#endif
-
-/* Set WTF_ARM_ARCH_VERSION */
-#if defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__) \
- || defined(__MARM_ARMV4__)
-#define WTF_ARM_ARCH_VERSION 4
-
-#elif defined(__ARM_ARCH_5__) \
- || defined(__ARM_ARCH_5T__) \
- || defined(__MARM_ARMV5__)
-#define WTF_ARM_ARCH_VERSION 5
-
-#elif defined(__ARM_ARCH_5E__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__)
-#define WTF_ARM_ARCH_VERSION 5
-
-#elif defined(__ARM_ARCH_6__) \
- || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6T2__) \
- || defined(__ARMV6__)
-#define WTF_ARM_ARCH_VERSION 6
-
-#elif defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7K__) \
- || defined(__ARM_ARCH_7R__) \
- || defined(__ARM_ARCH_7S__)
-#define WTF_ARM_ARCH_VERSION 7
-
-#elif defined(__ARM_ARCH_8__) \
- || defined(__ARM_ARCH_8A__)
-#define WTF_ARM_ARCH_VERSION 8
-
-/* MSVC sets _M_ARM */
-#elif defined(_M_ARM)
-#define WTF_ARM_ARCH_VERSION _M_ARM
-
-/* RVCT sets _TARGET_ARCH_ARM */
-#elif defined(__TARGET_ARCH_ARM)
-#define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
-
-#else
-#define WTF_ARM_ARCH_VERSION 0
-
-#endif
-
-/* FIXME: WTF_THUMB_ARCH_VERSION seems unused. Remove. */
-/* Set WTF_THUMB_ARCH_VERSION */
-#if defined(__ARM_ARCH_4T__)
-#define WTF_THUMB_ARCH_VERSION 1
-
-#elif defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__)
-#define WTF_THUMB_ARCH_VERSION 2
-
-#elif defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6M__)
-#define WTF_THUMB_ARCH_VERSION 3
-
-#elif defined(__ARM_ARCH_6T2__) \
- || defined(__ARM_ARCH_7__) \
- || defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7K__) \
- || defined(__ARM_ARCH_7M__) \
- || defined(__ARM_ARCH_7R__) \
- || defined(__ARM_ARCH_7S__)
-#define WTF_THUMB_ARCH_VERSION 4
-
-/* RVCT sets __TARGET_ARCH_THUMB */
-#elif defined(__TARGET_ARCH_THUMB)
-#define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
-
-#else
-#define WTF_THUMB_ARCH_VERSION 0
-#endif
-
-
-/* FIXME: CPU(ARMV5_OR_LOWER) seems unused. Remove. */
-/* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
-/* On ARMv5 and below the natural alignment is required.
- And there are some other differences for v5 or earlier. */
-#if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
-#define WTF_CPU_ARMV5_OR_LOWER 1
-#endif
-
-
-/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
-/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
-/* Only one of these will be defined. */
-#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
-# if defined(thumb2) || defined(__thumb2__) \
- || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
-# define WTF_CPU_ARM_TRADITIONAL 0
-# define WTF_CPU_ARM_THUMB2 1
-# elif WTF_ARM_ARCH_AT_LEAST(4)
-# define WTF_CPU_ARM_TRADITIONAL 1
-# define WTF_CPU_ARM_THUMB2 0
-# else
-# error "Not supported ARM architecture"
-# endif
-#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
-# error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
-#endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
-
-#if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
-#define WTF_CPU_ARM_NEON 1
-#endif
-
-#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
-#define WTF_CPU_ARM_VFP 1
-#endif
-
-/* If CPU(ARM_NEON) is not enabled, we'll conservatively assume only VFP2 or VFPv3D16
- support is available. Hence, only the first 16 64-bit floating point registers
- are available. See:
- NEON registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJACABEJ.html
- VFP2 and VFP3 registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CIHDIBDG.html
- NEON to VFP register mapping: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJAIJHFC.html
-*/
-#if CPU(ARM_NEON)
-#define WTF_CPU_ARM_VFP_V3_D32 1
-#else
-#define WTF_CPU_ARM_VFP_V2 1
-#endif
-
-#if defined(__ARM_ARCH_7K__)
-#define WTF_CPU_APPLE_ARMV7K 1
-#endif
-
-#if defined(__ARM_ARCH_7S__)
-#define WTF_CPU_APPLE_ARMV7S 1
-#endif
-
-#endif /* ARM */
-
-#if !CPU(KNOWN)
-#define WTF_CPU_UNKNOWN 1
-#endif
-
-#if CPU(ARM) || CPU(MIPS) || CPU(UNKNOWN)
-#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
-#endif
-
-#if COMPILER(GCC_COMPATIBLE)
-/* __LP64__ is not defined on 64bit Windows since it uses LLP64. Using __SIZEOF_POINTER__ is simpler. */
-#if __SIZEOF_POINTER__ == 8
-#define WTF_CPU_ADDRESS64 1
-#elif __SIZEOF_POINTER__ == 4
-#define WTF_CPU_ADDRESS32 1
-#else
-#error "Unsupported pointer width"
-#endif
-#elif COMPILER(MSVC)
-#if defined(_WIN64)
-#define WTF_CPU_ADDRESS64 1
-#else
-#define WTF_CPU_ADDRESS32 1
-#endif
-#else
-/* This is the most generic way. But in OS(DARWIN), Platform.h can be included by sandbox definition file (.sb).
- * At that time, we cannot include "stdint.h" header. So in the case of known compilers, we use predefined constants instead. */
-#include <stdint.h>
-#if UINTPTR_MAX > UINT32_MAX
-#define WTF_CPU_ADDRESS64 1
-#else
-#define WTF_CPU_ADDRESS32 1
-#endif
-#endif
-
-/* CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
-
-#if COMPILER(GCC_COMPATIBLE)
-#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-#define WTF_CPU_BIG_ENDIAN 1
-#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-#define WTF_CPU_LITTLE_ENDIAN 1
-#elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
-#define WTF_CPU_MIDDLE_ENDIAN 1
-#else
-#error "Unknown endian"
-#endif
-#else
-#if defined(WIN32) || defined(_WIN32)
-/* Windows only have little endian architecture. */
-#define WTF_CPU_LITTLE_ENDIAN 1
-#else
-#include <sys/types.h>
-#if __has_include(<endian.h>)
-#include <endian.h>
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define WTF_CPU_BIG_ENDIAN 1
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-#define WTF_CPU_LITTLE_ENDIAN 1
-#elif __BYTE_ORDER == __PDP_ENDIAN
-#define WTF_CPU_MIDDLE_ENDIAN 1
-#else
-#error "Unknown endian"
-#endif
-#else
-#if __has_include(<machine/endian.h>)
-#include <machine/endian.h>
-#else
-#include <sys/endian.h>
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
-#define WTF_CPU_BIG_ENDIAN 1
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define WTF_CPU_LITTLE_ENDIAN 1
-#elif BYTE_ORDER == PDP_ENDIAN
-#define WTF_CPU_MIDDLE_ENDIAN 1
-#else
-#error "Unknown endian"
-#endif
-#endif
-#endif
-#endif
-
-#if !CPU(LITTLE_ENDIAN) && !CPU(BIG_ENDIAN)
-#error "Unsupported endian"
-#endif
Deleted: trunk/Source/WTF/wtf/FeatureDefines.h (254543 => 254544)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -1,1047 +0,0 @@
-/*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
- * Copyright (C) 2007-2009 Torch Mobile, Inc.
- * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#ifndef __PLATFORM_INDIRECT__
-#error "Please #include <wtf/Platform.h> instead of this file directly."
-#endif
-
-/* Use this file to list _all_ ENABLE() macros. Define the macros to be one of the following values:
- * - "0" disables the feature by default. The feature can still be enabled for a specific port or environment.
- * - "1" enables the feature by default. The feature can still be disabled for a specific port or environment.
- *
- * The feature defaults in this file are only taken into account if the (port specific) build system
- * has not enabled or disabled a particular feature.
- *
- * Use this file to define ENABLE() macros only. Do not use this file to define USE() or macros !
- *
- * Only define a macro if it was not defined before - always check for !defined first.
- *
- * Keep the file sorted by the name of the defines. As an exception you can change the order
- * to allow interdependencies between the default values.
- *
- * Below are a few potential commands to take advantage of this file running from the Source/WTF directory
- *
- * Get the list of feature defines: grep -o "ENABLE_\(\w\+\)" wtf/FeatureDefines.h | sort | uniq
- * Get the list of features enabled by default for a PLATFORM(XXX): gcc -E -dM -I. -DWTF_PLATFORM_XXX "wtf/Platform.h" | grep "ENABLE_\w\+ 1" | cut -d' ' -f2 | sort
- */
-
-/* FIXME: Move out the PLATFORM specific rules into platform specific files. */
-
-/* --------- Apple iOS (but not macOS) port --------- */
-#if PLATFORM(IOS_FAMILY)
-
-#if !defined(ENABLE_AIRPLAY_PICKER)
-#if !PLATFORM(MACCATALYST)
-#define ENABLE_AIRPLAY_PICKER 1
-#endif
-#endif
-
-#if !defined(ENABLE_APPLE_PAY_REMOTE_UI)
-#if !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS)
-#define ENABLE_APPLE_PAY_REMOTE_UI 1
-#endif
-#endif
-
-#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 1
-#endif
-
-#if !defined(ENABLE_CONTEXT_MENUS)
-#define ENABLE_CONTEXT_MENUS 0
-#endif
-
-#if !defined(ENABLE_CONTEXT_MENU_EVENT)
-#if !PLATFORM(MACCATALYST)
-#define ENABLE_CONTEXT_MENU_EVENT 0
-#endif
-#endif
-
-#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT)
-#define ENABLE_CUSTOM_CURSOR_SUPPORT 0
-#endif
-
-#if !defined(ENABLE_DRAG_SUPPORT)
-#define ENABLE_DRAG_SUPPORT 0
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_TELEMETRY)
-#define ENABLE_INSPECTOR_TELEMETRY 0
-#endif
-
-#if !defined(ENABLE_LETTERPRESS)
-#define ENABLE_LETTERPRESS 1
-#endif
-
-#if !defined(ENABLE_AUTOCORRECT)
-#define ENABLE_AUTOCORRECT 1
-#endif
-
-#if !defined(ENABLE_AUTOCAPITALIZE)
-#define ENABLE_AUTOCAPITALIZE 1
-#endif
-
-#if !defined(ENABLE_IOS_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_IOS_GESTURE_EVENTS 1
-#endif
-
-#if !defined(ENABLE_TEXT_AUTOSIZING)
-#define ENABLE_TEXT_AUTOSIZING 1
-#endif
-
-#if !defined(ENABLE_IOS_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_IOS_TOUCH_EVENTS 1
-#endif
-
-#if !defined(ENABLE_METER_ELEMENT)
-#define ENABLE_METER_ELEMENT 0
-#endif
-
-#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
-#define ENABLE_NETSCAPE_PLUGIN_API 0
-#endif
-
-#if !defined(ENABLE_ORIENTATION_EVENTS)
-#define ENABLE_ORIENTATION_EVENTS 1
-#endif
-
-#if !defined(ENABLE_POINTER_LOCK)
-#define ENABLE_POINTER_LOCK 0
-#endif
-
-#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 1
-#endif
-
-#if !defined(ENABLE_RESPECT_EXIF_ORIENTATION)
-#define ENABLE_RESPECT_EXIF_ORIENTATION 1
-#endif
-
-#if !defined(ENABLE_TEXT_CARET)
-#define ENABLE_TEXT_CARET 0
-#endif
-
-#if !defined(ENABLE_TEXT_SELECTION)
-#define ENABLE_TEXT_SELECTION 0
-#endif
-
-/* FIXME: Remove the USE(APPLE_INTERNAL_SDK) conjunct once we support touch events when building against
-the public iOS SDK. See <https://webkit.org/b/179167>. */
-#if !defined(ENABLE_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_TOUCH_EVENTS 1
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 1
-#endif
-
-#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
-#endif
-
-#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
-#define ENABLE_DOWNLOAD_ATTRIBUTE 1
-#endif
-
-#if !defined(ENABLE_WKPDFVIEW)
-#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
-#define ENABLE_WKPDFVIEW 1
-#endif
-#endif
-
-#if !defined(ENABLE_MEDIA_SOURCE)
-#define ENABLE_MEDIA_SOURCE 0
-#endif
-
-#if !defined(ENABLE_PREVIEW_CONVERTER)
-#if PLATFORM(IOS)
-#define ENABLE_PREVIEW_CONVERTER 1
-#endif
-#endif
-
-#if !defined(ENABLE_META_VIEWPORT)
-#define ENABLE_META_VIEWPORT 1
-#endif
-
-/* FIXME: This seems unused. If so, it should be removed. */
-#if CPU(ARM64)
-#define ENABLE_JIT_CONSTANT_BLINDING 0
-#endif
-
-#endif /* PLATFORM(IOS_FAMILY) */
-
-/* --------- Apple watchOS port --------- */
-#if PLATFORM(WATCHOS)
-
-#endif /* PLATFORM(WATCHOS) */
-
-/* --------- Apple macOS port (not iOS) --------- */
-#if PLATFORM(MAC)
-
-#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 1
-#endif
-
-#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 1
-#endif
-
-#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_TELEMETRY)
-#define ENABLE_INSPECTOR_TELEMETRY 1
-#endif
-
-#if !defined(ENABLE_SMOOTH_SCROLLING)
-#define ENABLE_SMOOTH_SCROLLING 1
-#endif
-
-#if ENABLE(VIDEO)
-#if !defined(ENABLE_VIDEO_TRACK)
-#define ENABLE_VIDEO_TRACK 1
-#endif
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEB_AUDIO)
-#define ENABLE_WEB_AUDIO 1
-#endif
-
-#if !defined(ENABLE_CURSOR_VISIBILITY)
-#define ENABLE_CURSOR_VISIBILITY 1
-#endif
-
-#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
-#endif
-
-#if !defined(ENABLE_MAC_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_MAC_GESTURE_EVENTS 1
-#endif
-
-#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP)
-#define ENABLE_WEBPROCESS_NSRUNLOOP __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
-#endif
-
-#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING)
-#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING ENABLE_WEBPROCESS_NSRUNLOOP
-#endif
-
-#if !defined(ENABLE_MEDIA_SOURCE)
-#define ENABLE_MEDIA_SOURCE 1
-#endif
-
-#endif /* PLATFORM(MAC) */
-
-/* --------- Apple Cocoa platforms --------- */
-
-#if PLATFORM(COCOA)
-
-#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA)
-#if PLATFORM(MACCATALYST)
-#define ENABLE_LEGACY_ENCRYPTED_MEDIA 0
-#else
-#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
-#endif
-#endif
-
-#if !defined(ENABLE_FILE_REPLACEMENT)
-#define ENABLE_FILE_REPLACEMENT 1
-#endif
-
-#if !defined(ENABLE_PAYMENT_REQUEST)
-#define ENABLE_PAYMENT_REQUEST 1
-#endif
-
-#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 1
-#endif
-
-#if !defined(ENABLE_UI_SIDE_COMPOSITING)
-#define ENABLE_UI_SIDE_COMPOSITING 1
-#endif
-
-#endif /* PLATFORM(COCOA) */
-
-#if !PLATFORM(COCOA)
-
-#if !defined(JSC_OBJC_API_ENABLED)
-#define JSC_OBJC_API_ENABLED 0
-#endif
-
-#endif /* !PLATFORM(COCOA) */
-
-
-/* --------- Apple Windows port --------- */
-#if PLATFORM(WIN) && !PLATFORM(WIN_CAIRO)
-
-#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 1
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 0
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
-#endif
-
-#endif /* PLATFORM(WIN) && !PLATFORM(WIN_CAIRO) */
-
-/* --------- Windows CAIRO port --------- */
-/* PLATFORM(WIN_CAIRO) is a specialization of PLATFORM(WIN). */
-/* PLATFORM(WIN) is always enabled when PLATFORM(WIN_CAIRO) is enabled. */
-#if PLATFORM(WIN_CAIRO)
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 1
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
-#endif
-
-#endif /* PLATFORM(WIN_CAIRO) */
-
-/* ENABLE macro defaults for WebCore */
-/* Do not use PLATFORM() tests in this section ! */
-
-#if !defined(ENABLE_3D_TRANSFORMS)
-#define ENABLE_3D_TRANSFORMS 0
-#endif
-
-#if !defined(ENABLE_ACCESSIBILITY)
-#define ENABLE_ACCESSIBILITY 1
-#endif
-
-#if !defined(ENABLE_ACCELERATED_2D_CANVAS)
-#define ENABLE_ACCELERATED_2D_CANVAS 0
-#endif
-
-#if !defined(ENABLE_OVERFLOW_SCROLLING_TOUCH)
-#define ENABLE_OVERFLOW_SCROLLING_TOUCH 0
-#endif
-
-#if !defined(ENABLE_APNG)
-#define ENABLE_APNG 1
-#endif
-
-#if !defined(ENABLE_CHANNEL_MESSAGING)
-#define ENABLE_CHANNEL_MESSAGING 1
-#endif
-
-#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 0
-#endif
-
-#if !defined(ENABLE_CONTEXT_MENUS)
-#define ENABLE_CONTEXT_MENUS 1
-#endif
-
-#if !defined(ENABLE_CONTEXT_MENU_EVENT)
-#define ENABLE_CONTEXT_MENU_EVENT 1
-#endif
-
-#if !defined(ENABLE_CSS3_TEXT)
-#define ENABLE_CSS3_TEXT 0
-#endif
-
-#if !defined(ENABLE_CSS_BOX_DECORATION_BREAK)
-#define ENABLE_CSS_BOX_DECORATION_BREAK 1
-#endif
-
-#if !defined(ENABLE_CSS_DEVICE_ADAPTATION)
-#define ENABLE_CSS_DEVICE_ADAPTATION 0
-#endif
-
-#if !defined(ENABLE_CSS_COMPOSITING)
-#define ENABLE_CSS_COMPOSITING 0
-#endif
-
-#if !defined(ENABLE_CSS_IMAGE_RESOLUTION)
-#define ENABLE_CSS_IMAGE_RESOLUTION 0
-#endif
-
-#if !defined(ENABLE_CSS_CONIC_GRADIENTS)
-#define ENABLE_CSS_CONIC_GRADIENTS 0
-#endif
-
-#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT)
-#define ENABLE_CUSTOM_CURSOR_SUPPORT 1
-#endif
-
-#if !defined(ENABLE_CUSTOM_SCHEME_HANDLER)
-#define ENABLE_CUSTOM_SCHEME_HANDLER 0
-#endif
-
-#if !defined(ENABLE_DARK_MODE_CSS)
-#define ENABLE_DARK_MODE_CSS 0
-#endif
-
-#if !defined(ENABLE_DATALIST_ELEMENT)
-#define ENABLE_DATALIST_ELEMENT 0
-#endif
-
-#if !defined(ENABLE_DEVICE_ORIENTATION)
-#define ENABLE_DEVICE_ORIENTATION 0
-#endif
-
-#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
-#define ENABLE_DOWNLOAD_ATTRIBUTE 1
-#endif
-
-#if !defined(ENABLE_DRAG_SUPPORT)
-#define ENABLE_DRAG_SUPPORT 1
-#endif
-
-#if !defined(ENABLE_ENCRYPTED_MEDIA)
-#define ENABLE_ENCRYPTED_MEDIA 0
-#endif
-
-#if !defined(ENABLE_FILTERS_LEVEL_2)
-#define ENABLE_FILTERS_LEVEL_2 0
-#endif
-
-#if !defined(ENABLE_FTPDIR)
-#define ENABLE_FTPDIR 1
-#endif
-
-#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 0
-#endif
-
-#if !defined(ENABLE_GAMEPAD)
-#define ENABLE_GAMEPAD 0
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 0
-#endif
-
-#if !defined(ENABLE_INDEXED_DATABASE)
-#define ENABLE_INDEXED_DATABASE 0
-#endif
-
-#if !defined(ENABLE_INDEXED_DATABASE_IN_WORKERS)
-#define ENABLE_INDEXED_DATABASE_IN_WORKERS 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_COLOR)
-#define ENABLE_INPUT_TYPE_COLOR 1
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_DATE)
-#define ENABLE_INPUT_TYPE_DATE 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE)
-#define ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL)
-#define ENABLE_INPUT_TYPE_DATETIMELOCAL 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_MONTH)
-#define ENABLE_INPUT_TYPE_MONTH 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_TIME)
-#define ENABLE_INPUT_TYPE_TIME 0
-#endif
-
-#if !defined(ENABLE_INPUT_TYPE_WEEK)
-#define ENABLE_INPUT_TYPE_WEEK 0
-#endif
-
-#if ENABLE(INPUT_TYPE_DATE) || ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE) || ENABLE(INPUT_TYPE_DATETIMELOCAL) || ENABLE(INPUT_TYPE_MONTH) || ENABLE(INPUT_TYPE_TIME) || ENABLE(INPUT_TYPE_WEEK)
-#if !defined(ENABLE_DATE_AND_TIME_INPUT_TYPES)
-#define ENABLE_DATE_AND_TIME_INPUT_TYPES 1
-#endif
-#endif
-
-#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 0
-#endif
-
-#if !defined(ENABLE_INSPECTOR_TELEMETRY)
-#define ENABLE_INSPECTOR_TELEMETRY 0
-#endif
-
-#if !defined(ENABLE_INTL)
-#define ENABLE_INTL 0
-#endif
-
-#if !defined(ENABLE_LAYOUT_FORMATTING_CONTEXT)
-#define ENABLE_LAYOUT_FORMATTING_CONTEXT 0
-#endif
-
-#if !defined(ENABLE_LEGACY_CSS_VENDOR_PREFIXES)
-#define ENABLE_LEGACY_CSS_VENDOR_PREFIXES 0
-#endif
-
-#if !defined(ENABLE_LETTERPRESS)
-#define ENABLE_LETTERPRESS 0
-#endif
-
-#if !defined(ENABLE_MATHML)
-#define ENABLE_MATHML 1
-#endif
-
-#if !defined(ENABLE_MEDIA_CAPTURE)
-#define ENABLE_MEDIA_CAPTURE 0
-#endif
-
-#if !defined(ENABLE_MEDIA_CONTROLS_SCRIPT)
-#define ENABLE_MEDIA_CONTROLS_SCRIPT 0
-#endif
-
-#if !defined(ENABLE_MEDIA_SOURCE)
-#define ENABLE_MEDIA_SOURCE 0
-#endif
-
-#if !defined(ENABLE_MEDIA_STATISTICS)
-#define ENABLE_MEDIA_STATISTICS 0
-#endif
-
-#if !defined(ENABLE_MEDIA_STREAM)
-#define ENABLE_MEDIA_STREAM 0
-#endif
-
-#if !defined(ENABLE_METER_ELEMENT)
-#define ENABLE_METER_ELEMENT 1
-#endif
-
-#if !defined(ENABLE_MHTML)
-#define ENABLE_MHTML 0
-#endif
-
-#if !defined(ENABLE_MOUSE_CURSOR_SCALE)
-#define ENABLE_MOUSE_CURSOR_SCALE 0
-#endif
-
-#if !defined(ENABLE_MOUSE_FORCE_EVENTS)
-#define ENABLE_MOUSE_FORCE_EVENTS 1
-#endif
-
-#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
-#define ENABLE_NETSCAPE_PLUGIN_API 1
-#endif
-
-#if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
-#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
-#endif
-
-#if !defined(ENABLE_NOTIFICATIONS)
-#define ENABLE_NOTIFICATIONS 0
-#endif
-
-#if !defined(ENABLE_OFFSCREEN_CANVAS)
-#define ENABLE_OFFSCREEN_CANVAS 0
-#endif
-
-#if !defined(ENABLE_OPENTYPE_VERTICAL)
-#define ENABLE_OPENTYPE_VERTICAL 0
-#endif
-
-#if !defined(ENABLE_ORIENTATION_EVENTS)
-#define ENABLE_ORIENTATION_EVENTS 0
-#endif
-
-#if OS(WINDOWS)
-#if !defined(ENABLE_PAN_SCROLLING)
-#define ENABLE_PAN_SCROLLING 1
-#endif
-#endif
-
-#if !defined(ENABLE_PAYMENT_REQUEST)
-#define ENABLE_PAYMENT_REQUEST 0
-#endif
-
-#if !defined(ENABLE_POINTER_LOCK)
-#define ENABLE_POINTER_LOCK 1
-#endif
-
-#if !defined(ENABLE_QUOTA)
-#define ENABLE_QUOTA 0
-#endif
-
-#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 0
-#endif
-
-#if !defined(ENABLE_RUBBER_BANDING)
-#define ENABLE_RUBBER_BANDING 0
-#endif
-
-#if !defined(ENABLE_SECURITY_ASSERTIONS)
-/* Enable security assertions on all ASAN builds and debug builds. */
-#if ASAN_ENABLED || !defined(NDEBUG)
-#define ENABLE_SECURITY_ASSERTIONS 1
-#endif
-#endif
-
-#if !defined(ENABLE_SMOOTH_SCROLLING)
-#define ENABLE_SMOOTH_SCROLLING 0
-#endif
-
-#if !defined(ENABLE_SPEECH_SYNTHESIS)
-#define ENABLE_SPEECH_SYNTHESIS 0
-#endif
-
-#if !defined(ENABLE_SPELLCHECK)
-#define ENABLE_SPELLCHECK 0
-#endif
-
-#if !defined(ENABLE_STREAMS_API)
-#define ENABLE_STREAMS_API 1
-#endif
-
-#if !defined(ENABLE_SVG_FONTS)
-#define ENABLE_SVG_FONTS 1
-#endif
-
-#if !defined(ENABLE_TEXT_CARET)
-#define ENABLE_TEXT_CARET 1
-#endif
-
-#if !defined(ENABLE_TEXT_SELECTION)
-#define ENABLE_TEXT_SELECTION 1
-#endif
-
-#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 0
-#endif
-
-#if !defined(ENABLE_TOUCH_EVENTS)
-#define ENABLE_TOUCH_EVENTS 0
-#endif
-
-#if !defined(ENABLE_VIDEO)
-#define ENABLE_VIDEO 0
-#endif
-
-#if !defined(ENABLE_VIDEO_TRACK)
-#define ENABLE_VIDEO_TRACK 0
-#endif
-
-#if !defined(ENABLE_DATACUE_VALUE)
-#define ENABLE_DATACUE_VALUE 0
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 0
-#endif
-
-#if !defined(ENABLE_GRAPHICS_CONTEXT_GL)
-#define ENABLE_GRAPHICS_CONTEXT_GL ENABLE_WEBGL
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 0
-#endif
-
-#if !defined(ENABLE_WEB_AUDIO)
-#define ENABLE_WEB_AUDIO 0
-#endif
-
-#if !defined(ENABLE_XSLT)
-#define ENABLE_XSLT 1
-#endif
-
-#if !defined(ENABLE_DATA_INTERACTION)
-#define ENABLE_DATA_INTERACTION 0
-#endif
-
-#if !defined(ENABLE_SERVICE_WORKER)
-#define ENABLE_SERVICE_WORKER 1
-#endif
-
-
-/* JIT Features */
-
-/* The JIT is enabled by default on all x86-64 & ARM64 platforms. */
-#if !defined(ENABLE_JIT) && (CPU(X86_64) || CPU(ARM64)) && !CPU(APPLE_ARMV7K)
-#define ENABLE_JIT 1
-#endif
-
-#if USE(JSVALUE32_64)
-#if (CPU(ARM_THUMB2) || CPU(MIPS)) && OS(LINUX)
-/* On ARMv7 and MIPS on Linux the JIT is enabled unless explicitly disabled. */
-#if !defined(ENABLE_JIT)
-#define ENABLE_JIT 1
-#endif
-#else
-/* Disable JIT and force C_LOOP on all other 32bit architectures. */
-#undef ENABLE_JIT
-#define ENABLE_JIT 0
-#undef ENABLE_C_LOOP
-#define ENABLE_C_LOOP 1
-#endif
-#endif
-
-#if !defined(ENABLE_C_LOOP)
-#if ENABLE(JIT) || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__))
-#define ENABLE_C_LOOP 0
-#else
-#define ENABLE_C_LOOP 1
-#endif
-#endif
-
-/* FIXME: This should be turned into an #error invariant */
-/* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */
-#if USE(JSVALUE32_64)
-#undef ENABLE_FTL_JIT
-#define ENABLE_FTL_JIT 0
-#endif
-
-/* FIXME: This should be turned into an #error invariant */
-/* The FTL is disabled on the iOS simulator, mostly for simplicity. */
-#if PLATFORM(IOS_FAMILY_SIMULATOR)
-#undef ENABLE_FTL_JIT
-#define ENABLE_FTL_JIT 0
-#endif
-
-/* FIXME: This is used to "turn on a specific feature of WebKit", so should be converted to an ENABLE macro. */
-/* If possible, try to enable a disassembler. This is optional. We proceed in two
- steps: first we try to find some disassembler that we can use, and then we
- decide if the high-level disassembler API can be enabled. */
-#if !defined(USE_UDIS86) && ENABLE(JIT) && CPU(X86_64) && !USE(CAPSTONE)
-#define USE_UDIS86 1
-#endif
-
-/* FIXME: This is used to "turn on a specific feature of WebKit", so should be converted to an ENABLE macro. */
-#if !defined(USE_ARM64_DISASSEMBLER) && ENABLE(JIT) && CPU(ARM64) && !USE(CAPSTONE)
-#define USE_ARM64_DISASSEMBLER 1
-#endif
-
-#if !defined(ENABLE_DISASSEMBLER) && (USE(UDIS86) || USE(ARM64_DISASSEMBLER) || (ENABLE(JIT) && USE(CAPSTONE)))
-#define ENABLE_DISASSEMBLER 1
-#endif
-
-#if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
-
-/* Enable the DFG JIT on X86 and X86_64. */
-#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD) || OS(WINDOWS))
-#define ENABLE_DFG_JIT 1
-#endif
-
-/* Enable the DFG JIT on ARMv7. Only tested on iOS, Linux, and FreeBSD. */
-#if (CPU(ARM_THUMB2) || CPU(ARM64)) && (PLATFORM(IOS_FAMILY) || OS(LINUX) || OS(FREEBSD))
-#define ENABLE_DFG_JIT 1
-#endif
-/* Enable the DFG JIT on MIPS. */
-#if CPU(MIPS)
-#define ENABLE_DFG_JIT 1
-#endif
-
-#endif /* !defined(ENABLE_DFG_JIT) && ENABLE(JIT) */
-
-/* Concurrent JS only works on 64-bit platforms because it requires that
- values get stored to atomically. This is trivially true on 64-bit platforms,
- but not true at all on 32-bit platforms where values are composed of two
- separate sub-values. */
-#if ENABLE(JIT) && USE(JSVALUE64)
-#define ENABLE_CONCURRENT_JS 1
-#endif
-
-#if (CPU(X86_64) || CPU(ARM64)) && HAVE(FAST_TLS)
-#define ENABLE_FAST_TLS_JIT 1
-#endif
-
-#if ENABLE(JIT) && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(ARM64) || CPU(MIPS))
-#define ENABLE_MASM_PROBE 1
-#endif
-
-/* FIXME: This should be turned into an #error invariant */
-/* If the baseline jit is not available, then disable upper tiers as well.
- The MacroAssembler::probe() is also required for supporting the upper tiers. */
-#if !ENABLE(JIT) || !ENABLE(MASM_PROBE)
-#undef ENABLE_DFG_JIT
-#undef ENABLE_FTL_JIT
-#define ENABLE_DFG_JIT 0
-#define ENABLE_FTL_JIT 0
-#endif
-
-/* FIXME: This should be turned into an #error invariant */
-/* If the DFG jit is not available, then disable upper tiers as well: */
-#if !ENABLE(DFG_JIT)
-#undef ENABLE_FTL_JIT
-#define ENABLE_FTL_JIT 0
-#endif
-
-/* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
-#if ENABLE(FTL_JIT)
-#define ENABLE_B3_JIT 1
-#endif
-
-#if !defined(ENABLE_WEBASSEMBLY) && (ENABLE(B3_JIT) && PLATFORM(COCOA) && CPU(ADDRESS64))
-#define ENABLE_WEBASSEMBLY 1
-#endif
-
-/* The SamplingProfiler is the probabilistic and low-overhead profiler used by
- * JSC to measure where time is spent inside a _javascript_ program.
- * In configurations other than Windows and Darwin, because layout of mcontext_t depends on standard libraries (like glibc),
- * sampling profiler is enabled if WebKit uses pthreads and glibc. */
-#if !defined(ENABLE_SAMPLING_PROFILER) && (!ENABLE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT)))
-#define ENABLE_SAMPLING_PROFILER 1
-#endif
-
-#if ENABLE(WEBASSEMBLY) && HAVE(MACHINE_CONTEXT)
-#define ENABLE_WEBASSEMBLY_FAST_MEMORY 1
-#endif
-
-/* Counts uses of write barriers using sampling counters. Be sure to also
- set ENABLE_SAMPLING_COUNTERS to 1. */
-#if !defined(ENABLE_WRITE_BARRIER_PROFILING)
-#define ENABLE_WRITE_BARRIER_PROFILING 0
-#endif
-
-/* Logs all allocation-related activity that goes through fastMalloc or the
- JSC GC (both cells and butterflies). Also logs marking. Note that this
- isn't a completely accurate view of the heap since it doesn't include all
- butterfly resize operations, doesn't tell you what is going on with weak
- references (other than to tell you when they're marked), and doesn't
- track direct mmap() allocations or things like JIT allocation. */
-#if !defined(ENABLE_ALLOCATION_LOGGING)
-#define ENABLE_ALLOCATION_LOGGING 0
-#endif
-
-/* Enable verification that that register allocations are not made within generated control flow.
- Turned on for debug builds. */
-#if !defined(ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION) && ENABLE(DFG_JIT) && !defined(NDEBUG)
-#define ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION 1
-#endif
-
-#if !defined(ENABLE_SEPARATED_WX_HEAP) && PLATFORM(IOS_FAMILY) && CPU(ARM64) && (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E))
-#define ENABLE_SEPARATED_WX_HEAP 1
-#endif
-
-/* Determine if we need to enable Computed Goto Opcodes or not: */
-#if HAVE(COMPUTED_GOTO) || !ENABLE(C_LOOP)
-#define ENABLE_COMPUTED_GOTO_OPCODES 1
-#endif
-
-/* Regular _expression_ Tracing - Set to 1 to trace RegExp's in jsc. Results dumped at exit */
-#if !defined(ENABLE_REGEXP_TRACING)
-#define ENABLE_REGEXP_TRACING 0
-#endif
-
-/* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
-#define ENABLE_YARR_JIT 1
-#endif
-
-/* Setting this flag compares JIT results with interpreter results. */
-#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
-#define ENABLE_YARR_JIT_DEBUG 0
-#endif
-
-/* Enable JIT'ing Regular Expressions that have nested parenthesis . */
-#if ENABLE(YARR_JIT) && (CPU(ARM64) || (CPU(X86_64) && !OS(WINDOWS)))
-#define ENABLE_YARR_JIT_ALL_PARENS_EXPRESSIONS 1
-#endif
-
-/* Enable JIT'ing Regular Expressions that have nested back references. */
-#if ENABLE(YARR_JIT) && (CPU(ARM64) || (CPU(X86_64) && !OS(WINDOWS)))
-#define ENABLE_YARR_JIT_BACKREFERENCES 1
-#endif
-
-/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
- enabled as well: */
-#if ENABLE(JIT) || ENABLE(YARR_JIT) || !ENABLE(C_LOOP)
-#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
-#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
-#else
-#undef ENABLE_ASSEMBLER
-#define ENABLE_ASSEMBLER 1
-#endif
-#endif
-
-/* If the Disassembler is enabled, then the Assembler must be enabled as well: */
-#if ENABLE(DISASSEMBLER)
-#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
-#error "Cannot enable the Disassembler without enabling the Assembler"
-#else
-#undef ENABLE_ASSEMBLER
-#define ENABLE_ASSEMBLER 1
-#endif
-#endif
-
-#if !defined(ENABLE_EXCEPTION_SCOPE_VERIFICATION)
-#define ENABLE_EXCEPTION_SCOPE_VERIFICATION ASSERT_ENABLED
-#endif
-
-#if ENABLE(DFG_JIT) && HAVE(MACHINE_CONTEXT) && (CPU(X86_64) || CPU(ARM64))
-#define ENABLE_SIGNAL_BASED_VM_TRAPS 1
-#endif
-
-/* CSS Selector JIT Compiler */
-#if !defined(ENABLE_CSS_SELECTOR_JIT) && ((CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && PLATFORM(IOS_FAMILY))) && ENABLE(JIT) && (OS(DARWIN) || PLATFORM(GTK) || PLATFORM(WPE)))
-#define ENABLE_CSS_SELECTOR_JIT 1
-#endif
-
-#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST)
-#define ENABLE_DATA_DETECTION 1
-#endif
-
-#if CPU(ARM_THUMB2) || CPU(ARM64)
-#define ENABLE_BRANCH_COMPACTION 1
-#endif
-
-#if !defined(ENABLE_THREADING_LIBDISPATCH) && HAVE(DISPATCH_H)
-#define ENABLE_THREADING_LIBDISPATCH 1
-#elif !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
-#define ENABLE_THREADING_OPENMP 1
-#elif !defined(THREADING_GENERIC)
-#define ENABLE_THREADING_GENERIC 1
-#endif
-
-#if !defined(ENABLE_GC_VALIDATION) && !defined(NDEBUG)
-#define ENABLE_GC_VALIDATION 1
-#endif
-
-#if !defined(ENABLE_BINDING_INTEGRITY) && !OS(WINDOWS)
-#define ENABLE_BINDING_INTEGRITY 1
-#endif
-
-#if !defined(ENABLE_TREE_DEBUGGING) && !defined(NDEBUG)
-#define ENABLE_TREE_DEBUGGING 1
-#endif
-
-#if PLATFORM(COCOA)
-#define ENABLE_RESOURCE_USAGE 1
-#endif
-
-/* FIXME: Document or remove explicit undef. */
-#if PLATFORM(GTK) || PLATFORM(WPE)
-#undef ENABLE_OPENTYPE_VERTICAL
-#define ENABLE_OPENTYPE_VERTICAL 1
-#endif
-
-/* FIXME: Document or remove explicit undef. */
-#if (OS(DARWIN) && USE(CG)) || (USE(FREETYPE) && !PLATFORM(GTK)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))
-#undef ENABLE_OPENTYPE_MATH
-#define ENABLE_OPENTYPE_MATH 1
-#endif
-
-/*
- * Enable this to put each IsoHeap and other allocation categories into their own malloc heaps, so that tools like vmmap can show how big each heap is.
- * Turn BENABLE_MALLOC_HEAP_BREAKDOWN on in bmalloc together when using this.
- */
-#if !defined(ENABLE_MALLOC_HEAP_BREAKDOWN)
-#define ENABLE_MALLOC_HEAP_BREAKDOWN 0
-#endif
-
-/* Disable SharedArrayBuffers until Spectre security concerns are mitigated. */
-#define ENABLE_SHARED_ARRAY_BUFFER 0
-
-/* FIXME: __LP64__ can probably be removed now that 32-bit macOS is no longer supported. */
-#if PLATFORM(MAC) && defined(__LP64__)
-#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
-#endif
-
-#if PLATFORM(COCOA)
-/* FIXME: This is a USE style macro, as it triggers the use of CFURLConnection framework stubs. */
-/* FIXME: Is this still necessary? CFURLConnection isn't used on Cocoa platforms any more. */
-#define ENABLE_SEC_ITEM_SHIM 1
-#endif
-
-#if PLATFORM(MAC)
-#define ENABLE_FULL_KEYBOARD_ACCESS 1
-#endif
-
-#if ((PLATFORM(COCOA) || PLATFORM(PLAYSTATION) || PLATFORM(WPE)) && ENABLE(ASYNC_SCROLLING)) || PLATFORM(GTK)
-#define ENABLE_KINETIC_SCROLLING 1
-#endif
-
-#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000))
-#define ENABLE_MONOSPACE_FONT_EXCEPTION 1
-#endif
-
-#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING) && PLATFORM(MACCATALYST)
-#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
-#endif
-
-
-/* Asserts, invariants for macro definitions */
-
-#if ENABLE(VIDEO_TRACK) && !ENABLE(VIDEO)
-#error "ENABLE(VIDEO_TRACK) requires ENABLE(VIDEO)"
-#endif
-
-#if ENABLE(MEDIA_CONTROLS_SCRIPT) && !ENABLE(VIDEO)
-#error "ENABLE(MEDIA_CONTROLS_SCRIPT) requires ENABLE(VIDEO)"
-#endif
-
-#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) && !ENABLE(REMOTE_INSPECTOR)
-#error "ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) requires ENABLE(REMOTE_INSPECTOR)"
-#endif
-
-#if ENABLE(IOS_TOUCH_EVENTS) && !ENABLE(TOUCH_EVENTS)
-#error "ENABLE(IOS_TOUCH_EVENTS) requires ENABLE(TOUCH_EVENTS)"
-#endif
-
-#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_GL)
-#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_GL)"
-#endif
-
-#if ENABLE(WEBGL2) && !ENABLE(WEBGL)
-#error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
-#endif
Deleted: trunk/Source/WTF/wtf/OS.h (254543 => 254544)
--- trunk/Source/WTF/wtf/OS.h 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/wtf/OS.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
- * Copyright (C) 2007-2009 Torch Mobile, Inc.
- * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-/* Include compiler specific macros */
-#include <wtf/Compiler.h>
-
-#if defined(__APPLE__)
-#include <Availability.h>
-#include <AvailabilityMacros.h>
-#include <TargetConditionals.h>
-#endif
-
-
-/* OS() - underlying operating system; only to be used for mandated low-level services like
- virtual memory, not to choose a GUI toolkit */
-#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
-
-
-/* ==== OS() - underlying operating system; only to be used for mandated low-level services like
- virtual memory, not to choose a GUI toolkit ==== */
-
-/* OS(AIX) - AIX */
-#if defined(_AIX)
-#define WTF_OS_AIX 1
-#endif
-
-/* OS(DARWIN) - Any Darwin-based OS, including macOS, iOS, macCatalyst, tvOS, and watchOS */
-#if defined(__APPLE__)
-#define WTF_OS_DARWIN 1
-#endif
-
-/* OS(IOS_FAMILY) - iOS family, including iOS, macCatalyst, tvOS, watchOS */
-#if OS(DARWIN) && TARGET_OS_IPHONE
-#define WTF_OS_IOS_FAMILY 1
-#endif
-
-/* OS(IOS) - iOS only, not including macCatalyst */
-#if OS(DARWIN) && (TARGET_OS_IOS && !(defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST))
-#define WTF_OS_IOS 1
-#endif
-
-/* FIXME: Rename this to drop the X, as that is no longer the name of the operating system. */
-/* OS(MAC_OS_X) - macOS (not including iOS family) */
-#if OS(DARWIN) && TARGET_OS_OSX
-#define WTF_OS_MAC_OS_X 1
-#endif
-
-/* OS(FREEBSD) - FreeBSD */
-#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
-#define WTF_OS_FREEBSD 1
-#endif
-
-/* OS(FUCHSIA) - Fuchsia */
-#if defined(__Fuchsia__)
-#define WTF_OS_FUCHSIA 1
-#endif
-
-/* OS(HURD) - GNU/Hurd */
-#if defined(__GNU__)
-#define WTF_OS_HURD 1
-#endif
-
-/* OS(LINUX) - Linux */
-#if defined(__linux__)
-#define WTF_OS_LINUX 1
-#endif
-
-/* OS(NETBSD) - NetBSD */
-#if defined(__NetBSD__)
-#define WTF_OS_NETBSD 1
-#endif
-
-/* OS(OPENBSD) - OpenBSD */
-#if defined(__OpenBSD__)
-#define WTF_OS_OPENBSD 1
-#endif
-
-/* OS(WINDOWS) - Any version of Windows */
-#if defined(WIN32) || defined(_WIN32)
-#define WTF_OS_WINDOWS 1
-#endif
-
-
-/* OS(UNIX) - Any Unix-like system */
-#if OS(AIX) \
- || OS(DARWIN) \
- || OS(FREEBSD) \
- || OS(FUCHSIA) \
- || OS(HURD) \
- || OS(LINUX) \
- || OS(NETBSD) \
- || OS(OPENBSD) \
- || defined(unix) \
- || defined(__unix) \
- || defined(__unix__)
-#define WTF_OS_UNIX 1
-#endif
-
-
-/* Asserts, invariants for macro definitions */
-
-#define WTF_OS_WIN ERROR "USE WINDOWS WITH OS NOT WIN"
-#define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC"
Modified: trunk/Source/WTF/wtf/Platform.h (254543 => 254544)
--- trunk/Source/WTF/wtf/Platform.h 2020-01-15 00:10:26 UTC (rev 254543)
+++ trunk/Source/WTF/wtf/Platform.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -31,10 +31,10 @@
#include <wtf/Compiler.h>
/* Include CPU specific macros */
-#include <wtf/CPU.h>
+#include <wtf/PlatformCPU.h>
/* Include underlying operating system specific macros */
-#include <wtf/OS.h>
+#include <wtf/PlatformOS.h>
/* ==== PLATFORM handles OS, operating environment, graphics API, and
CPU. This macro will be phased out in favor of platform adaptation
@@ -1051,7 +1051,7 @@
#define __PLATFORM_INDIRECT__
/* Include feature macros */
-#include <wtf/FeatureDefines.h>
+#include <wtf/PlatformEnable.h>
#undef __PLATFORM_INDIRECT__
Copied: trunk/Source/WTF/wtf/PlatformCPU.h (from rev 254543, trunk/Source/WTF/wtf/CPU.h) (0 => 254544)
--- trunk/Source/WTF/wtf/PlatformCPU.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformCPU.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -0,0 +1,363 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+/* Include compiler specific macros */
+#include <wtf/Compiler.h>
+
+/* CPU() - the target CPU architecture */
+#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
+
+/* ==== CPU() - the target CPU architecture ==== */
+/* CPU(KNOWN) becomes true if we explicitly support a target CPU. */
+
+/* CPU(MIPS) - MIPS 32-bit and 64-bit */
+#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64))
+#if defined(_ABI64) && (_MIPS_SIM == _ABI64)
+#define WTF_CPU_MIPS64 1
+#define WTF_MIPS_ARCH __mips64
+#else
+#define WTF_CPU_MIPS 1
+#define WTF_MIPS_ARCH __mips
+#endif
+#define WTF_CPU_KNOWN 1
+#define WTF_MIPS_PIC (defined __PIC__)
+#define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
+#define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
+#define WTF_MIPS_ARCH_REV __mips_isa_rev
+#define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
+#define WTF_MIPS_ISA_REV_AT_LEAST(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV >= v)
+#define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
+#define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
+#endif
+
+/* CPU(PPC64) - PowerPC 64-bit Big Endian */
+#if ( defined(__ppc64__) \
+ || defined(__PPC64__)) \
+ && defined(__BYTE_ORDER__) \
+ && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define WTF_CPU_PPC64 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(PPC64LE) - PowerPC 64-bit Little Endian */
+#if ( defined(__ppc64__) \
+ || defined(__PPC64__) \
+ || defined(__ppc64le__) \
+ || defined(__PPC64LE__)) \
+ && defined(__BYTE_ORDER__) \
+ && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+#define WTF_CPU_PPC64LE 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(PPC) - PowerPC 32-bit */
+#if ( defined(__ppc__) \
+ || defined(__PPC__) \
+ || defined(__powerpc__) \
+ || defined(__powerpc) \
+ || defined(__POWERPC__) \
+ || defined(_M_PPC) \
+ || defined(__PPC)) \
+ && !CPU(PPC64) \
+ && CPU(BIG_ENDIAN)
+#define WTF_CPU_PPC 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(X86) - i386 / x86 32-bit */
+#if defined(__i386__) \
+ || defined(i386) \
+ || defined(_M_IX86) \
+ || defined(_X86_) \
+ || defined(__THW_INTEL)
+#define WTF_CPU_X86 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
+#define WTF_CPU_X86_SSE2 1
+#endif
+
+#endif
+
+/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
+#if defined(__x86_64__) \
+ || defined(_M_X64)
+#define WTF_CPU_X86_64 1
+#define WTF_CPU_X86_SSE2 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(ARM64) - Apple */
+#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
+#define WTF_CPU_ARM64 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__arm64e__)
+#define WTF_CPU_ARM64E 1
+#endif
+#endif
+
+/* CPU(ARM) - ARM, any version*/
+#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
+
+#if defined(arm) \
+ || defined(__arm__) \
+ || defined(ARM) \
+ || defined(_ARM_)
+#define WTF_CPU_ARM 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__ARM_PCS_VFP)
+#define WTF_CPU_ARM_HARDFP 1
+#endif
+
+/* Set WTF_ARM_ARCH_VERSION */
+#if defined(__ARM_ARCH_4__) \
+ || defined(__ARM_ARCH_4T__) \
+ || defined(__MARM_ARMV4__)
+#define WTF_ARM_ARCH_VERSION 4
+
+#elif defined(__ARM_ARCH_5__) \
+ || defined(__ARM_ARCH_5T__) \
+ || defined(__MARM_ARMV5__)
+#define WTF_ARM_ARCH_VERSION 5
+
+#elif defined(__ARM_ARCH_5E__) \
+ || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__)
+#define WTF_ARM_ARCH_VERSION 5
+
+#elif defined(__ARM_ARCH_6__) \
+ || defined(__ARM_ARCH_6J__) \
+ || defined(__ARM_ARCH_6K__) \
+ || defined(__ARM_ARCH_6Z__) \
+ || defined(__ARM_ARCH_6ZK__) \
+ || defined(__ARM_ARCH_6T2__) \
+ || defined(__ARMV6__)
+#define WTF_ARM_ARCH_VERSION 6
+
+#elif defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7K__) \
+ || defined(__ARM_ARCH_7R__) \
+ || defined(__ARM_ARCH_7S__)
+#define WTF_ARM_ARCH_VERSION 7
+
+#elif defined(__ARM_ARCH_8__) \
+ || defined(__ARM_ARCH_8A__)
+#define WTF_ARM_ARCH_VERSION 8
+
+/* MSVC sets _M_ARM */
+#elif defined(_M_ARM)
+#define WTF_ARM_ARCH_VERSION _M_ARM
+
+/* RVCT sets _TARGET_ARCH_ARM */
+#elif defined(__TARGET_ARCH_ARM)
+#define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
+
+#else
+#define WTF_ARM_ARCH_VERSION 0
+
+#endif
+
+/* FIXME: WTF_THUMB_ARCH_VERSION seems unused. Remove. */
+/* Set WTF_THUMB_ARCH_VERSION */
+#if defined(__ARM_ARCH_4T__)
+#define WTF_THUMB_ARCH_VERSION 1
+
+#elif defined(__ARM_ARCH_5T__) \
+ || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__)
+#define WTF_THUMB_ARCH_VERSION 2
+
+#elif defined(__ARM_ARCH_6J__) \
+ || defined(__ARM_ARCH_6K__) \
+ || defined(__ARM_ARCH_6Z__) \
+ || defined(__ARM_ARCH_6ZK__) \
+ || defined(__ARM_ARCH_6M__)
+#define WTF_THUMB_ARCH_VERSION 3
+
+#elif defined(__ARM_ARCH_6T2__) \
+ || defined(__ARM_ARCH_7__) \
+ || defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7K__) \
+ || defined(__ARM_ARCH_7M__) \
+ || defined(__ARM_ARCH_7R__) \
+ || defined(__ARM_ARCH_7S__)
+#define WTF_THUMB_ARCH_VERSION 4
+
+/* RVCT sets __TARGET_ARCH_THUMB */
+#elif defined(__TARGET_ARCH_THUMB)
+#define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
+
+#else
+#define WTF_THUMB_ARCH_VERSION 0
+#endif
+
+
+/* FIXME: CPU(ARMV5_OR_LOWER) seems unused. Remove. */
+/* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
+/* On ARMv5 and below the natural alignment is required.
+ And there are some other differences for v5 or earlier. */
+#if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
+#define WTF_CPU_ARMV5_OR_LOWER 1
+#endif
+
+
+/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
+/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
+/* Only one of these will be defined. */
+#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
+# if defined(thumb2) || defined(__thumb2__) \
+ || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
+# define WTF_CPU_ARM_TRADITIONAL 0
+# define WTF_CPU_ARM_THUMB2 1
+# elif WTF_ARM_ARCH_AT_LEAST(4)
+# define WTF_CPU_ARM_TRADITIONAL 1
+# define WTF_CPU_ARM_THUMB2 0
+# else
+# error "Not supported ARM architecture"
+# endif
+#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
+# error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
+#endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
+
+#if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
+#define WTF_CPU_ARM_NEON 1
+#endif
+
+#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
+#define WTF_CPU_ARM_VFP 1
+#endif
+
+/* If CPU(ARM_NEON) is not enabled, we'll conservatively assume only VFP2 or VFPv3D16
+ support is available. Hence, only the first 16 64-bit floating point registers
+ are available. See:
+ NEON registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJACABEJ.html
+ VFP2 and VFP3 registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CIHDIBDG.html
+ NEON to VFP register mapping: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJAIJHFC.html
+*/
+#if CPU(ARM_NEON)
+#define WTF_CPU_ARM_VFP_V3_D32 1
+#else
+#define WTF_CPU_ARM_VFP_V2 1
+#endif
+
+#if defined(__ARM_ARCH_7K__)
+#define WTF_CPU_APPLE_ARMV7K 1
+#endif
+
+#if defined(__ARM_ARCH_7S__)
+#define WTF_CPU_APPLE_ARMV7S 1
+#endif
+
+#endif /* ARM */
+
+#if !CPU(KNOWN)
+#define WTF_CPU_UNKNOWN 1
+#endif
+
+#if CPU(ARM) || CPU(MIPS) || CPU(UNKNOWN)
+#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
+#endif
+
+#if COMPILER(GCC_COMPATIBLE)
+/* __LP64__ is not defined on 64bit Windows since it uses LLP64. Using __SIZEOF_POINTER__ is simpler. */
+#if __SIZEOF_POINTER__ == 8
+#define WTF_CPU_ADDRESS64 1
+#elif __SIZEOF_POINTER__ == 4
+#define WTF_CPU_ADDRESS32 1
+#else
+#error "Unsupported pointer width"
+#endif
+#elif COMPILER(MSVC)
+#if defined(_WIN64)
+#define WTF_CPU_ADDRESS64 1
+#else
+#define WTF_CPU_ADDRESS32 1
+#endif
+#else
+/* This is the most generic way. But in OS(DARWIN), Platform.h can be included by sandbox definition file (.sb).
+ * At that time, we cannot include "stdint.h" header. So in the case of known compilers, we use predefined constants instead. */
+#include <stdint.h>
+#if UINTPTR_MAX > UINT32_MAX
+#define WTF_CPU_ADDRESS64 1
+#else
+#define WTF_CPU_ADDRESS32 1
+#endif
+#endif
+
+/* CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
+
+#if COMPILER(GCC_COMPATIBLE)
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WTF_CPU_BIG_ENDIAN 1
+#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#else
+#if defined(WIN32) || defined(_WIN32)
+/* Windows only have little endian architecture. */
+#define WTF_CPU_LITTLE_ENDIAN 1
+#else
+#include <sys/types.h>
+#if __has_include(<endian.h>)
+#include <endian.h>
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define WTF_CPU_BIG_ENDIAN 1
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif __BYTE_ORDER == __PDP_ENDIAN
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#else
+#if __has_include(<machine/endian.h>)
+#include <machine/endian.h>
+#else
+#include <sys/endian.h>
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+#define WTF_CPU_BIG_ENDIAN 1
+#elif BYTE_ORDER == LITTLE_ENDIAN
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif BYTE_ORDER == PDP_ENDIAN
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#endif
+#endif
+#endif
+
+#if !CPU(LITTLE_ENDIAN) && !CPU(BIG_ENDIAN)
+#error "Unsupported endian"
+#endif
Copied: trunk/Source/WTF/wtf/PlatformEnable.h (from rev 254543, trunk/Source/WTF/wtf/FeatureDefines.h) (0 => 254544)
--- trunk/Source/WTF/wtf/PlatformEnable.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformEnable.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -0,0 +1,1047 @@
+/*
+ * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#ifndef __PLATFORM_INDIRECT__
+#error "Please #include <wtf/Platform.h> instead of this file directly."
+#endif
+
+/* Use this file to list _all_ ENABLE() macros. Define the macros to be one of the following values:
+ * - "0" disables the feature by default. The feature can still be enabled for a specific port or environment.
+ * - "1" enables the feature by default. The feature can still be disabled for a specific port or environment.
+ *
+ * The feature defaults in this file are only taken into account if the (port specific) build system
+ * has not enabled or disabled a particular feature.
+ *
+ * Use this file to define ENABLE() macros only. Do not use this file to define USE() or macros !
+ *
+ * Only define a macro if it was not defined before - always check for !defined first.
+ *
+ * Keep the file sorted by the name of the defines. As an exception you can change the order
+ * to allow interdependencies between the default values.
+ *
+ * Below are a few potential commands to take advantage of this file running from the Source/WTF directory
+ *
+ * Get the list of feature defines: grep -o "ENABLE_\(\w\+\)" wtf/PlatformEnable.h | sort | uniq
+ * Get the list of features enabled by default for a PLATFORM(XXX): gcc -E -dM -I. -DWTF_PLATFORM_XXX "wtf/Platform.h" | grep "ENABLE_\w\+ 1" | cut -d' ' -f2 | sort
+ */
+
+/* FIXME: Move out the PLATFORM specific rules into platform specific files. */
+
+/* --------- Apple iOS (but not macOS) port --------- */
+#if PLATFORM(IOS_FAMILY)
+
+#if !defined(ENABLE_AIRPLAY_PICKER)
+#if !PLATFORM(MACCATALYST)
+#define ENABLE_AIRPLAY_PICKER 1
+#endif
+#endif
+
+#if !defined(ENABLE_APPLE_PAY_REMOTE_UI)
+#if !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS)
+#define ENABLE_APPLE_PAY_REMOTE_UI 1
+#endif
+#endif
+
+#if !defined(ENABLE_CONTENT_EXTENSIONS)
+#define ENABLE_CONTENT_EXTENSIONS 1
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENUS)
+#define ENABLE_CONTEXT_MENUS 0
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENU_EVENT)
+#if !PLATFORM(MACCATALYST)
+#define ENABLE_CONTEXT_MENU_EVENT 0
+#endif
+#endif
+
+#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT)
+#define ENABLE_CUSTOM_CURSOR_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_DRAG_SUPPORT)
+#define ENABLE_DRAG_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
+#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_TELEMETRY)
+#define ENABLE_INSPECTOR_TELEMETRY 0
+#endif
+
+#if !defined(ENABLE_LETTERPRESS)
+#define ENABLE_LETTERPRESS 1
+#endif
+
+#if !defined(ENABLE_AUTOCORRECT)
+#define ENABLE_AUTOCORRECT 1
+#endif
+
+#if !defined(ENABLE_AUTOCAPITALIZE)
+#define ENABLE_AUTOCAPITALIZE 1
+#endif
+
+#if !defined(ENABLE_IOS_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
+#define ENABLE_IOS_GESTURE_EVENTS 1
+#endif
+
+#if !defined(ENABLE_TEXT_AUTOSIZING)
+#define ENABLE_TEXT_AUTOSIZING 1
+#endif
+
+#if !defined(ENABLE_IOS_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
+#define ENABLE_IOS_TOUCH_EVENTS 1
+#endif
+
+#if !defined(ENABLE_METER_ELEMENT)
+#define ENABLE_METER_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
+#define ENABLE_NETSCAPE_PLUGIN_API 0
+#endif
+
+#if !defined(ENABLE_ORIENTATION_EVENTS)
+#define ENABLE_ORIENTATION_EVENTS 1
+#endif
+
+#if !defined(ENABLE_POINTER_LOCK)
+#define ENABLE_POINTER_LOCK 0
+#endif
+
+#if !defined(ENABLE_REMOTE_INSPECTOR)
+#define ENABLE_REMOTE_INSPECTOR 1
+#endif
+
+#if !defined(ENABLE_RESPECT_EXIF_ORIENTATION)
+#define ENABLE_RESPECT_EXIF_ORIENTATION 1
+#endif
+
+#if !defined(ENABLE_TEXT_CARET)
+#define ENABLE_TEXT_CARET 0
+#endif
+
+#if !defined(ENABLE_TEXT_SELECTION)
+#define ENABLE_TEXT_SELECTION 0
+#endif
+
+/* FIXME: Remove the USE(APPLE_INTERNAL_SDK) conjunct once we support touch events when building against
+the public iOS SDK. See <https://webkit.org/b/179167>. */
+#if !defined(ENABLE_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
+#define ENABLE_TOUCH_EVENTS 1
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 1
+#endif
+
+#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
+#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
+#endif
+
+#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
+#define ENABLE_DOWNLOAD_ATTRIBUTE 1
+#endif
+
+#if !defined(ENABLE_WKPDFVIEW)
+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
+#define ENABLE_WKPDFVIEW 1
+#endif
+#endif
+
+#if !defined(ENABLE_MEDIA_SOURCE)
+#define ENABLE_MEDIA_SOURCE 0
+#endif
+
+#if !defined(ENABLE_PREVIEW_CONVERTER)
+#if PLATFORM(IOS)
+#define ENABLE_PREVIEW_CONVERTER 1
+#endif
+#endif
+
+#if !defined(ENABLE_META_VIEWPORT)
+#define ENABLE_META_VIEWPORT 1
+#endif
+
+/* FIXME: This seems unused. If so, it should be removed. */
+#if CPU(ARM64)
+#define ENABLE_JIT_CONSTANT_BLINDING 0
+#endif
+
+#endif /* PLATFORM(IOS_FAMILY) */
+
+/* --------- Apple watchOS port --------- */
+#if PLATFORM(WATCHOS)
+
+#endif /* PLATFORM(WATCHOS) */
+
+/* --------- Apple macOS port (not iOS) --------- */
+#if PLATFORM(MAC)
+
+#if !defined(ENABLE_CONTENT_EXTENSIONS)
+#define ENABLE_CONTENT_EXTENSIONS 1
+#endif
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if !defined(ENABLE_REMOTE_INSPECTOR)
+#define ENABLE_REMOTE_INSPECTOR 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
+#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_TELEMETRY)
+#define ENABLE_INSPECTOR_TELEMETRY 1
+#endif
+
+#if !defined(ENABLE_SMOOTH_SCROLLING)
+#define ENABLE_SMOOTH_SCROLLING 1
+#endif
+
+#if ENABLE(VIDEO)
+#if !defined(ENABLE_VIDEO_TRACK)
+#define ENABLE_VIDEO_TRACK 1
+#endif
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEB_AUDIO)
+#define ENABLE_WEB_AUDIO 1
+#endif
+
+#if !defined(ENABLE_CURSOR_VISIBILITY)
+#define ENABLE_CURSOR_VISIBILITY 1
+#endif
+
+#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
+#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
+#endif
+
+#if !defined(ENABLE_MAC_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
+#define ENABLE_MAC_GESTURE_EVENTS 1
+#endif
+
+#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP)
+#define ENABLE_WEBPROCESS_NSRUNLOOP __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#endif
+
+#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING)
+#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING ENABLE_WEBPROCESS_NSRUNLOOP
+#endif
+
+#if !defined(ENABLE_MEDIA_SOURCE)
+#define ENABLE_MEDIA_SOURCE 1
+#endif
+
+#endif /* PLATFORM(MAC) */
+
+/* --------- Apple Cocoa platforms --------- */
+
+#if PLATFORM(COCOA)
+
+#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA)
+#if PLATFORM(MACCATALYST)
+#define ENABLE_LEGACY_ENCRYPTED_MEDIA 0
+#else
+#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
+#endif
+#endif
+
+#if !defined(ENABLE_FILE_REPLACEMENT)
+#define ENABLE_FILE_REPLACEMENT 1
+#endif
+
+#if !defined(ENABLE_PAYMENT_REQUEST)
+#define ENABLE_PAYMENT_REQUEST 1
+#endif
+
+#if !defined(ENABLE_ASYNC_SCROLLING)
+#define ENABLE_ASYNC_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_UI_SIDE_COMPOSITING)
+#define ENABLE_UI_SIDE_COMPOSITING 1
+#endif
+
+#endif /* PLATFORM(COCOA) */
+
+#if !PLATFORM(COCOA)
+
+#if !defined(JSC_OBJC_API_ENABLED)
+#define JSC_OBJC_API_ENABLED 0
+#endif
+
+#endif /* !PLATFORM(COCOA) */
+
+
+/* --------- Apple Windows port --------- */
+#if PLATFORM(WIN) && !PLATFORM(WIN_CAIRO)
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
+#endif /* PLATFORM(WIN) && !PLATFORM(WIN_CAIRO) */
+
+/* --------- Windows CAIRO port --------- */
+/* PLATFORM(WIN_CAIRO) is a specialization of PLATFORM(WIN). */
+/* PLATFORM(WIN) is always enabled when PLATFORM(WIN_CAIRO) is enabled. */
+#if PLATFORM(WIN_CAIRO)
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 1
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
+#endif /* PLATFORM(WIN_CAIRO) */
+
+/* ENABLE macro defaults for WebCore */
+/* Do not use PLATFORM() tests in this section ! */
+
+#if !defined(ENABLE_3D_TRANSFORMS)
+#define ENABLE_3D_TRANSFORMS 0
+#endif
+
+#if !defined(ENABLE_ACCESSIBILITY)
+#define ENABLE_ACCESSIBILITY 1
+#endif
+
+#if !defined(ENABLE_ACCELERATED_2D_CANVAS)
+#define ENABLE_ACCELERATED_2D_CANVAS 0
+#endif
+
+#if !defined(ENABLE_OVERFLOW_SCROLLING_TOUCH)
+#define ENABLE_OVERFLOW_SCROLLING_TOUCH 0
+#endif
+
+#if !defined(ENABLE_APNG)
+#define ENABLE_APNG 1
+#endif
+
+#if !defined(ENABLE_CHANNEL_MESSAGING)
+#define ENABLE_CHANNEL_MESSAGING 1
+#endif
+
+#if !defined(ENABLE_CONTENT_EXTENSIONS)
+#define ENABLE_CONTENT_EXTENSIONS 0
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENUS)
+#define ENABLE_CONTEXT_MENUS 1
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENU_EVENT)
+#define ENABLE_CONTEXT_MENU_EVENT 1
+#endif
+
+#if !defined(ENABLE_CSS3_TEXT)
+#define ENABLE_CSS3_TEXT 0
+#endif
+
+#if !defined(ENABLE_CSS_BOX_DECORATION_BREAK)
+#define ENABLE_CSS_BOX_DECORATION_BREAK 1
+#endif
+
+#if !defined(ENABLE_CSS_DEVICE_ADAPTATION)
+#define ENABLE_CSS_DEVICE_ADAPTATION 0
+#endif
+
+#if !defined(ENABLE_CSS_COMPOSITING)
+#define ENABLE_CSS_COMPOSITING 0
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_RESOLUTION)
+#define ENABLE_CSS_IMAGE_RESOLUTION 0
+#endif
+
+#if !defined(ENABLE_CSS_CONIC_GRADIENTS)
+#define ENABLE_CSS_CONIC_GRADIENTS 0
+#endif
+
+#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT)
+#define ENABLE_CUSTOM_CURSOR_SUPPORT 1
+#endif
+
+#if !defined(ENABLE_CUSTOM_SCHEME_HANDLER)
+#define ENABLE_CUSTOM_SCHEME_HANDLER 0
+#endif
+
+#if !defined(ENABLE_DARK_MODE_CSS)
+#define ENABLE_DARK_MODE_CSS 0
+#endif
+
+#if !defined(ENABLE_DATALIST_ELEMENT)
+#define ENABLE_DATALIST_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_DEVICE_ORIENTATION)
+#define ENABLE_DEVICE_ORIENTATION 0
+#endif
+
+#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
+#define ENABLE_DOWNLOAD_ATTRIBUTE 1
+#endif
+
+#if !defined(ENABLE_DRAG_SUPPORT)
+#define ENABLE_DRAG_SUPPORT 1
+#endif
+
+#if !defined(ENABLE_ENCRYPTED_MEDIA)
+#define ENABLE_ENCRYPTED_MEDIA 0
+#endif
+
+#if !defined(ENABLE_FILTERS_LEVEL_2)
+#define ENABLE_FILTERS_LEVEL_2 0
+#endif
+
+#if !defined(ENABLE_FTPDIR)
+#define ENABLE_FTPDIR 1
+#endif
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 0
+#endif
+
+#if !defined(ENABLE_GAMEPAD)
+#define ENABLE_GAMEPAD 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 0
+#endif
+
+#if !defined(ENABLE_INDEXED_DATABASE)
+#define ENABLE_INDEXED_DATABASE 0
+#endif
+
+#if !defined(ENABLE_INDEXED_DATABASE_IN_WORKERS)
+#define ENABLE_INDEXED_DATABASE_IN_WORKERS 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_COLOR)
+#define ENABLE_INPUT_TYPE_COLOR 1
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATE)
+#define ENABLE_INPUT_TYPE_DATE 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE)
+#define ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL)
+#define ENABLE_INPUT_TYPE_DATETIMELOCAL 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_MONTH)
+#define ENABLE_INPUT_TYPE_MONTH 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_TIME)
+#define ENABLE_INPUT_TYPE_TIME 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_WEEK)
+#define ENABLE_INPUT_TYPE_WEEK 0
+#endif
+
+#if ENABLE(INPUT_TYPE_DATE) || ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE) || ENABLE(INPUT_TYPE_DATETIMELOCAL) || ENABLE(INPUT_TYPE_MONTH) || ENABLE(INPUT_TYPE_TIME) || ENABLE(INPUT_TYPE_WEEK)
+#if !defined(ENABLE_DATE_AND_TIME_INPUT_TYPES)
+#define ENABLE_DATE_AND_TIME_INPUT_TYPES 1
+#endif
+#endif
+
+#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
+#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 0
+#endif
+
+#if !defined(ENABLE_INSPECTOR_TELEMETRY)
+#define ENABLE_INSPECTOR_TELEMETRY 0
+#endif
+
+#if !defined(ENABLE_INTL)
+#define ENABLE_INTL 0
+#endif
+
+#if !defined(ENABLE_LAYOUT_FORMATTING_CONTEXT)
+#define ENABLE_LAYOUT_FORMATTING_CONTEXT 0
+#endif
+
+#if !defined(ENABLE_LEGACY_CSS_VENDOR_PREFIXES)
+#define ENABLE_LEGACY_CSS_VENDOR_PREFIXES 0
+#endif
+
+#if !defined(ENABLE_LETTERPRESS)
+#define ENABLE_LETTERPRESS 0
+#endif
+
+#if !defined(ENABLE_MATHML)
+#define ENABLE_MATHML 1
+#endif
+
+#if !defined(ENABLE_MEDIA_CAPTURE)
+#define ENABLE_MEDIA_CAPTURE 0
+#endif
+
+#if !defined(ENABLE_MEDIA_CONTROLS_SCRIPT)
+#define ENABLE_MEDIA_CONTROLS_SCRIPT 0
+#endif
+
+#if !defined(ENABLE_MEDIA_SOURCE)
+#define ENABLE_MEDIA_SOURCE 0
+#endif
+
+#if !defined(ENABLE_MEDIA_STATISTICS)
+#define ENABLE_MEDIA_STATISTICS 0
+#endif
+
+#if !defined(ENABLE_MEDIA_STREAM)
+#define ENABLE_MEDIA_STREAM 0
+#endif
+
+#if !defined(ENABLE_METER_ELEMENT)
+#define ENABLE_METER_ELEMENT 1
+#endif
+
+#if !defined(ENABLE_MHTML)
+#define ENABLE_MHTML 0
+#endif
+
+#if !defined(ENABLE_MOUSE_CURSOR_SCALE)
+#define ENABLE_MOUSE_CURSOR_SCALE 0
+#endif
+
+#if !defined(ENABLE_MOUSE_FORCE_EVENTS)
+#define ENABLE_MOUSE_FORCE_EVENTS 1
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
+#define ENABLE_NETSCAPE_PLUGIN_API 1
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
+#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
+#endif
+
+#if !defined(ENABLE_NOTIFICATIONS)
+#define ENABLE_NOTIFICATIONS 0
+#endif
+
+#if !defined(ENABLE_OFFSCREEN_CANVAS)
+#define ENABLE_OFFSCREEN_CANVAS 0
+#endif
+
+#if !defined(ENABLE_OPENTYPE_VERTICAL)
+#define ENABLE_OPENTYPE_VERTICAL 0
+#endif
+
+#if !defined(ENABLE_ORIENTATION_EVENTS)
+#define ENABLE_ORIENTATION_EVENTS 0
+#endif
+
+#if OS(WINDOWS)
+#if !defined(ENABLE_PAN_SCROLLING)
+#define ENABLE_PAN_SCROLLING 1
+#endif
+#endif
+
+#if !defined(ENABLE_PAYMENT_REQUEST)
+#define ENABLE_PAYMENT_REQUEST 0
+#endif
+
+#if !defined(ENABLE_POINTER_LOCK)
+#define ENABLE_POINTER_LOCK 1
+#endif
+
+#if !defined(ENABLE_QUOTA)
+#define ENABLE_QUOTA 0
+#endif
+
+#if !defined(ENABLE_REMOTE_INSPECTOR)
+#define ENABLE_REMOTE_INSPECTOR 0
+#endif
+
+#if !defined(ENABLE_RUBBER_BANDING)
+#define ENABLE_RUBBER_BANDING 0
+#endif
+
+#if !defined(ENABLE_SECURITY_ASSERTIONS)
+/* Enable security assertions on all ASAN builds and debug builds. */
+#if ASAN_ENABLED || !defined(NDEBUG)
+#define ENABLE_SECURITY_ASSERTIONS 1
+#endif
+#endif
+
+#if !defined(ENABLE_SMOOTH_SCROLLING)
+#define ENABLE_SMOOTH_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_SPEECH_SYNTHESIS)
+#define ENABLE_SPEECH_SYNTHESIS 0
+#endif
+
+#if !defined(ENABLE_SPELLCHECK)
+#define ENABLE_SPELLCHECK 0
+#endif
+
+#if !defined(ENABLE_STREAMS_API)
+#define ENABLE_STREAMS_API 1
+#endif
+
+#if !defined(ENABLE_SVG_FONTS)
+#define ENABLE_SVG_FONTS 1
+#endif
+
+#if !defined(ENABLE_TEXT_CARET)
+#define ENABLE_TEXT_CARET 1
+#endif
+
+#if !defined(ENABLE_TEXT_SELECTION)
+#define ENABLE_TEXT_SELECTION 1
+#endif
+
+#if !defined(ENABLE_ASYNC_SCROLLING)
+#define ENABLE_ASYNC_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_TOUCH_EVENTS)
+#define ENABLE_TOUCH_EVENTS 0
+#endif
+
+#if !defined(ENABLE_VIDEO)
+#define ENABLE_VIDEO 0
+#endif
+
+#if !defined(ENABLE_VIDEO_TRACK)
+#define ENABLE_VIDEO_TRACK 0
+#endif
+
+#if !defined(ENABLE_DATACUE_VALUE)
+#define ENABLE_DATACUE_VALUE 0
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 0
+#endif
+
+#if !defined(ENABLE_GRAPHICS_CONTEXT_GL)
+#define ENABLE_GRAPHICS_CONTEXT_GL ENABLE_WEBGL
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 0
+#endif
+
+#if !defined(ENABLE_WEB_AUDIO)
+#define ENABLE_WEB_AUDIO 0
+#endif
+
+#if !defined(ENABLE_XSLT)
+#define ENABLE_XSLT 1
+#endif
+
+#if !defined(ENABLE_DATA_INTERACTION)
+#define ENABLE_DATA_INTERACTION 0
+#endif
+
+#if !defined(ENABLE_SERVICE_WORKER)
+#define ENABLE_SERVICE_WORKER 1
+#endif
+
+
+/* JIT Features */
+
+/* The JIT is enabled by default on all x86-64 & ARM64 platforms. */
+#if !defined(ENABLE_JIT) && (CPU(X86_64) || CPU(ARM64)) && !CPU(APPLE_ARMV7K)
+#define ENABLE_JIT 1
+#endif
+
+#if USE(JSVALUE32_64)
+#if (CPU(ARM_THUMB2) || CPU(MIPS)) && OS(LINUX)
+/* On ARMv7 and MIPS on Linux the JIT is enabled unless explicitly disabled. */
+#if !defined(ENABLE_JIT)
+#define ENABLE_JIT 1
+#endif
+#else
+/* Disable JIT and force C_LOOP on all other 32bit architectures. */
+#undef ENABLE_JIT
+#define ENABLE_JIT 0
+#undef ENABLE_C_LOOP
+#define ENABLE_C_LOOP 1
+#endif
+#endif
+
+#if !defined(ENABLE_C_LOOP)
+#if ENABLE(JIT) || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__))
+#define ENABLE_C_LOOP 0
+#else
+#define ENABLE_C_LOOP 1
+#endif
+#endif
+
+/* FIXME: This should be turned into an #error invariant */
+/* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */
+#if USE(JSVALUE32_64)
+#undef ENABLE_FTL_JIT
+#define ENABLE_FTL_JIT 0
+#endif
+
+/* FIXME: This should be turned into an #error invariant */
+/* The FTL is disabled on the iOS simulator, mostly for simplicity. */
+#if PLATFORM(IOS_FAMILY_SIMULATOR)
+#undef ENABLE_FTL_JIT
+#define ENABLE_FTL_JIT 0
+#endif
+
+/* FIXME: This is used to "turn on a specific feature of WebKit", so should be converted to an ENABLE macro. */
+/* If possible, try to enable a disassembler. This is optional. We proceed in two
+ steps: first we try to find some disassembler that we can use, and then we
+ decide if the high-level disassembler API can be enabled. */
+#if !defined(USE_UDIS86) && ENABLE(JIT) && CPU(X86_64) && !USE(CAPSTONE)
+#define USE_UDIS86 1
+#endif
+
+/* FIXME: This is used to "turn on a specific feature of WebKit", so should be converted to an ENABLE macro. */
+#if !defined(USE_ARM64_DISASSEMBLER) && ENABLE(JIT) && CPU(ARM64) && !USE(CAPSTONE)
+#define USE_ARM64_DISASSEMBLER 1
+#endif
+
+#if !defined(ENABLE_DISASSEMBLER) && (USE(UDIS86) || USE(ARM64_DISASSEMBLER) || (ENABLE(JIT) && USE(CAPSTONE)))
+#define ENABLE_DISASSEMBLER 1
+#endif
+
+#if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
+
+/* Enable the DFG JIT on X86 and X86_64. */
+#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD) || OS(WINDOWS))
+#define ENABLE_DFG_JIT 1
+#endif
+
+/* Enable the DFG JIT on ARMv7. Only tested on iOS, Linux, and FreeBSD. */
+#if (CPU(ARM_THUMB2) || CPU(ARM64)) && (PLATFORM(IOS_FAMILY) || OS(LINUX) || OS(FREEBSD))
+#define ENABLE_DFG_JIT 1
+#endif
+/* Enable the DFG JIT on MIPS. */
+#if CPU(MIPS)
+#define ENABLE_DFG_JIT 1
+#endif
+
+#endif /* !defined(ENABLE_DFG_JIT) && ENABLE(JIT) */
+
+/* Concurrent JS only works on 64-bit platforms because it requires that
+ values get stored to atomically. This is trivially true on 64-bit platforms,
+ but not true at all on 32-bit platforms where values are composed of two
+ separate sub-values. */
+#if ENABLE(JIT) && USE(JSVALUE64)
+#define ENABLE_CONCURRENT_JS 1
+#endif
+
+#if (CPU(X86_64) || CPU(ARM64)) && HAVE(FAST_TLS)
+#define ENABLE_FAST_TLS_JIT 1
+#endif
+
+#if ENABLE(JIT) && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(ARM64) || CPU(MIPS))
+#define ENABLE_MASM_PROBE 1
+#endif
+
+/* FIXME: This should be turned into an #error invariant */
+/* If the baseline jit is not available, then disable upper tiers as well.
+ The MacroAssembler::probe() is also required for supporting the upper tiers. */
+#if !ENABLE(JIT) || !ENABLE(MASM_PROBE)
+#undef ENABLE_DFG_JIT
+#undef ENABLE_FTL_JIT
+#define ENABLE_DFG_JIT 0
+#define ENABLE_FTL_JIT 0
+#endif
+
+/* FIXME: This should be turned into an #error invariant */
+/* If the DFG jit is not available, then disable upper tiers as well: */
+#if !ENABLE(DFG_JIT)
+#undef ENABLE_FTL_JIT
+#define ENABLE_FTL_JIT 0
+#endif
+
+/* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
+#if ENABLE(FTL_JIT)
+#define ENABLE_B3_JIT 1
+#endif
+
+#if !defined(ENABLE_WEBASSEMBLY) && (ENABLE(B3_JIT) && PLATFORM(COCOA) && CPU(ADDRESS64))
+#define ENABLE_WEBASSEMBLY 1
+#endif
+
+/* The SamplingProfiler is the probabilistic and low-overhead profiler used by
+ * JSC to measure where time is spent inside a _javascript_ program.
+ * In configurations other than Windows and Darwin, because layout of mcontext_t depends on standard libraries (like glibc),
+ * sampling profiler is enabled if WebKit uses pthreads and glibc. */
+#if !defined(ENABLE_SAMPLING_PROFILER) && (!ENABLE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT)))
+#define ENABLE_SAMPLING_PROFILER 1
+#endif
+
+#if ENABLE(WEBASSEMBLY) && HAVE(MACHINE_CONTEXT)
+#define ENABLE_WEBASSEMBLY_FAST_MEMORY 1
+#endif
+
+/* Counts uses of write barriers using sampling counters. Be sure to also
+ set ENABLE_SAMPLING_COUNTERS to 1. */
+#if !defined(ENABLE_WRITE_BARRIER_PROFILING)
+#define ENABLE_WRITE_BARRIER_PROFILING 0
+#endif
+
+/* Logs all allocation-related activity that goes through fastMalloc or the
+ JSC GC (both cells and butterflies). Also logs marking. Note that this
+ isn't a completely accurate view of the heap since it doesn't include all
+ butterfly resize operations, doesn't tell you what is going on with weak
+ references (other than to tell you when they're marked), and doesn't
+ track direct mmap() allocations or things like JIT allocation. */
+#if !defined(ENABLE_ALLOCATION_LOGGING)
+#define ENABLE_ALLOCATION_LOGGING 0
+#endif
+
+/* Enable verification that that register allocations are not made within generated control flow.
+ Turned on for debug builds. */
+#if !defined(ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION) && ENABLE(DFG_JIT) && !defined(NDEBUG)
+#define ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION 1
+#endif
+
+#if !defined(ENABLE_SEPARATED_WX_HEAP) && PLATFORM(IOS_FAMILY) && CPU(ARM64) && (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E))
+#define ENABLE_SEPARATED_WX_HEAP 1
+#endif
+
+/* Determine if we need to enable Computed Goto Opcodes or not: */
+#if HAVE(COMPUTED_GOTO) || !ENABLE(C_LOOP)
+#define ENABLE_COMPUTED_GOTO_OPCODES 1
+#endif
+
+/* Regular _expression_ Tracing - Set to 1 to trace RegExp's in jsc. Results dumped at exit */
+#if !defined(ENABLE_REGEXP_TRACING)
+#define ENABLE_REGEXP_TRACING 0
+#endif
+
+/* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
+#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
+#define ENABLE_YARR_JIT 1
+#endif
+
+/* Setting this flag compares JIT results with interpreter results. */
+#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
+#define ENABLE_YARR_JIT_DEBUG 0
+#endif
+
+/* Enable JIT'ing Regular Expressions that have nested parenthesis . */
+#if ENABLE(YARR_JIT) && (CPU(ARM64) || (CPU(X86_64) && !OS(WINDOWS)))
+#define ENABLE_YARR_JIT_ALL_PARENS_EXPRESSIONS 1
+#endif
+
+/* Enable JIT'ing Regular Expressions that have nested back references. */
+#if ENABLE(YARR_JIT) && (CPU(ARM64) || (CPU(X86_64) && !OS(WINDOWS)))
+#define ENABLE_YARR_JIT_BACKREFERENCES 1
+#endif
+
+/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
+ enabled as well: */
+#if ENABLE(JIT) || ENABLE(YARR_JIT) || !ENABLE(C_LOOP)
+#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
+#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
+#else
+#undef ENABLE_ASSEMBLER
+#define ENABLE_ASSEMBLER 1
+#endif
+#endif
+
+/* If the Disassembler is enabled, then the Assembler must be enabled as well: */
+#if ENABLE(DISASSEMBLER)
+#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
+#error "Cannot enable the Disassembler without enabling the Assembler"
+#else
+#undef ENABLE_ASSEMBLER
+#define ENABLE_ASSEMBLER 1
+#endif
+#endif
+
+#if !defined(ENABLE_EXCEPTION_SCOPE_VERIFICATION)
+#define ENABLE_EXCEPTION_SCOPE_VERIFICATION ASSERT_ENABLED
+#endif
+
+#if ENABLE(DFG_JIT) && HAVE(MACHINE_CONTEXT) && (CPU(X86_64) || CPU(ARM64))
+#define ENABLE_SIGNAL_BASED_VM_TRAPS 1
+#endif
+
+/* CSS Selector JIT Compiler */
+#if !defined(ENABLE_CSS_SELECTOR_JIT) && ((CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && PLATFORM(IOS_FAMILY))) && ENABLE(JIT) && (OS(DARWIN) || PLATFORM(GTK) || PLATFORM(WPE)))
+#define ENABLE_CSS_SELECTOR_JIT 1
+#endif
+
+#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST)
+#define ENABLE_DATA_DETECTION 1
+#endif
+
+#if CPU(ARM_THUMB2) || CPU(ARM64)
+#define ENABLE_BRANCH_COMPACTION 1
+#endif
+
+#if !defined(ENABLE_THREADING_LIBDISPATCH) && HAVE(DISPATCH_H)
+#define ENABLE_THREADING_LIBDISPATCH 1
+#elif !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
+#define ENABLE_THREADING_OPENMP 1
+#elif !defined(THREADING_GENERIC)
+#define ENABLE_THREADING_GENERIC 1
+#endif
+
+#if !defined(ENABLE_GC_VALIDATION) && !defined(NDEBUG)
+#define ENABLE_GC_VALIDATION 1
+#endif
+
+#if !defined(ENABLE_BINDING_INTEGRITY) && !OS(WINDOWS)
+#define ENABLE_BINDING_INTEGRITY 1
+#endif
+
+#if !defined(ENABLE_TREE_DEBUGGING) && !defined(NDEBUG)
+#define ENABLE_TREE_DEBUGGING 1
+#endif
+
+#if PLATFORM(COCOA)
+#define ENABLE_RESOURCE_USAGE 1
+#endif
+
+/* FIXME: Document or remove explicit undef. */
+#if PLATFORM(GTK) || PLATFORM(WPE)
+#undef ENABLE_OPENTYPE_VERTICAL
+#define ENABLE_OPENTYPE_VERTICAL 1
+#endif
+
+/* FIXME: Document or remove explicit undef. */
+#if (OS(DARWIN) && USE(CG)) || (USE(FREETYPE) && !PLATFORM(GTK)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))
+#undef ENABLE_OPENTYPE_MATH
+#define ENABLE_OPENTYPE_MATH 1
+#endif
+
+/*
+ * Enable this to put each IsoHeap and other allocation categories into their own malloc heaps, so that tools like vmmap can show how big each heap is.
+ * Turn BENABLE_MALLOC_HEAP_BREAKDOWN on in bmalloc together when using this.
+ */
+#if !defined(ENABLE_MALLOC_HEAP_BREAKDOWN)
+#define ENABLE_MALLOC_HEAP_BREAKDOWN 0
+#endif
+
+/* Disable SharedArrayBuffers until Spectre security concerns are mitigated. */
+#define ENABLE_SHARED_ARRAY_BUFFER 0
+
+/* FIXME: __LP64__ can probably be removed now that 32-bit macOS is no longer supported. */
+#if PLATFORM(MAC) && defined(__LP64__)
+#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
+#endif
+
+#if PLATFORM(COCOA)
+/* FIXME: This is a USE style macro, as it triggers the use of CFURLConnection framework stubs. */
+/* FIXME: Is this still necessary? CFURLConnection isn't used on Cocoa platforms any more. */
+#define ENABLE_SEC_ITEM_SHIM 1
+#endif
+
+#if PLATFORM(MAC)
+#define ENABLE_FULL_KEYBOARD_ACCESS 1
+#endif
+
+#if ((PLATFORM(COCOA) || PLATFORM(PLAYSTATION) || PLATFORM(WPE)) && ENABLE(ASYNC_SCROLLING)) || PLATFORM(GTK)
+#define ENABLE_KINETIC_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000))
+#define ENABLE_MONOSPACE_FONT_EXCEPTION 1
+#endif
+
+#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING) && PLATFORM(MACCATALYST)
+#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
+#endif
+
+
+/* Asserts, invariants for macro definitions */
+
+#if ENABLE(VIDEO_TRACK) && !ENABLE(VIDEO)
+#error "ENABLE(VIDEO_TRACK) requires ENABLE(VIDEO)"
+#endif
+
+#if ENABLE(MEDIA_CONTROLS_SCRIPT) && !ENABLE(VIDEO)
+#error "ENABLE(MEDIA_CONTROLS_SCRIPT) requires ENABLE(VIDEO)"
+#endif
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) && !ENABLE(REMOTE_INSPECTOR)
+#error "ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) requires ENABLE(REMOTE_INSPECTOR)"
+#endif
+
+#if ENABLE(IOS_TOUCH_EVENTS) && !ENABLE(TOUCH_EVENTS)
+#error "ENABLE(IOS_TOUCH_EVENTS) requires ENABLE(TOUCH_EVENTS)"
+#endif
+
+#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_GL)
+#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_GL)"
+#endif
+
+#if ENABLE(WEBGL2) && !ENABLE(WEBGL)
+#error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
+#endif
Copied: trunk/Source/WTF/wtf/PlatformOS.h (from rev 254543, trunk/Source/WTF/wtf/OS.h) (0 => 254544)
--- trunk/Source/WTF/wtf/PlatformOS.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformOS.h 2020-01-15 00:26:56 UTC (rev 254544)
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+/* Include compiler specific macros */
+#include <wtf/Compiler.h>
+
+#if defined(__APPLE__)
+#include <Availability.h>
+#include <AvailabilityMacros.h>
+#include <TargetConditionals.h>
+#endif
+
+
+/* OS() - underlying operating system; only to be used for mandated low-level services like
+ virtual memory, not to choose a GUI toolkit */
+#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
+
+
+/* ==== OS() - underlying operating system; only to be used for mandated low-level services like
+ virtual memory, not to choose a GUI toolkit ==== */
+
+/* OS(AIX) - AIX */
+#if defined(_AIX)
+#define WTF_OS_AIX 1
+#endif
+
+/* OS(DARWIN) - Any Darwin-based OS, including macOS, iOS, macCatalyst, tvOS, and watchOS */
+#if defined(__APPLE__)
+#define WTF_OS_DARWIN 1
+#endif
+
+/* OS(IOS_FAMILY) - iOS family, including iOS, macCatalyst, tvOS, watchOS */
+#if OS(DARWIN) && TARGET_OS_IPHONE
+#define WTF_OS_IOS_FAMILY 1
+#endif
+
+/* OS(IOS) - iOS only, not including macCatalyst */
+#if OS(DARWIN) && (TARGET_OS_IOS && !(defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST))
+#define WTF_OS_IOS 1
+#endif
+
+/* FIXME: Rename this to drop the X, as that is no longer the name of the operating system. */
+/* OS(MAC_OS_X) - macOS (not including iOS family) */
+#if OS(DARWIN) && TARGET_OS_OSX
+#define WTF_OS_MAC_OS_X 1
+#endif
+
+/* OS(FREEBSD) - FreeBSD */
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+#define WTF_OS_FREEBSD 1
+#endif
+
+/* OS(FUCHSIA) - Fuchsia */
+#if defined(__Fuchsia__)
+#define WTF_OS_FUCHSIA 1
+#endif
+
+/* OS(HURD) - GNU/Hurd */
+#if defined(__GNU__)
+#define WTF_OS_HURD 1
+#endif
+
+/* OS(LINUX) - Linux */
+#if defined(__linux__)
+#define WTF_OS_LINUX 1
+#endif
+
+/* OS(NETBSD) - NetBSD */
+#if defined(__NetBSD__)
+#define WTF_OS_NETBSD 1
+#endif
+
+/* OS(OPENBSD) - OpenBSD */
+#if defined(__OpenBSD__)
+#define WTF_OS_OPENBSD 1
+#endif
+
+/* OS(WINDOWS) - Any version of Windows */
+#if defined(WIN32) || defined(_WIN32)
+#define WTF_OS_WINDOWS 1
+#endif
+
+
+/* OS(UNIX) - Any Unix-like system */
+#if OS(AIX) \
+ || OS(DARWIN) \
+ || OS(FREEBSD) \
+ || OS(FUCHSIA) \
+ || OS(HURD) \
+ || OS(LINUX) \
+ || OS(NETBSD) \
+ || OS(OPENBSD) \
+ || defined(unix) \
+ || defined(__unix) \
+ || defined(__unix__)
+#define WTF_OS_UNIX 1
+#endif
+
+
+/* Asserts, invariants for macro definitions */
+
+#define WTF_OS_WIN ERROR "USE WINDOWS WITH OS NOT WIN"
+#define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC"