Title: [259711] trunk/Source
Revision
259711
Author
timothy_hor...@apple.com
Date
2020-04-08 02:38:51 -0700 (Wed, 08 Apr 2020)

Log Message

Rearrange and simplify some JSC feature flags
https://bugs.webkit.org/show_bug.cgi?id=210152

Reviewed by Saam Barati.

Source/_javascript_Core:

* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
* jit/ExecutableAllocator.cpp:
(JSC::isJITEnabled):
(JSC::ExecutableAllocator::setJITEnabled):
* runtime/Options.cpp:
(JSC::overrideDefaults):

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:
* wtf/PlatformUse.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (259710 => 259711)


--- trunk/Source/_javascript_Core/ChangeLog	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-04-08 09:38:51 UTC (rev 259711)
@@ -1,3 +1,18 @@
+2020-04-08  Tim Horton  <timothy_hor...@apple.com>
+
+        Rearrange and simplify some JSC feature flags
+        https://bugs.webkit.org/show_bug.cgi?id=210152
+
+        Reviewed by Saam Barati.
+
+        * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
+        (Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
+        * jit/ExecutableAllocator.cpp:
+        (JSC::isJITEnabled):
+        (JSC::ExecutableAllocator::setJITEnabled):
+        * runtime/Options.cpp:
+        (JSC::overrideDefaults):
+
 2020-04-08  Keith Rollin  <krol...@apple.com>
 
         Enable the use of XCBuild by default in Apple builds

Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm (259710 => 259711)


--- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm	2020-04-08 09:38:51 UTC (rev 259711)
@@ -36,7 +36,7 @@
 #import <wtf/Optional.h>
 #import <wtf/RunLoop.h>
 
-#if PLATFORM(IOS_FAMILY)
+#if USE(WEB_THREAD)
 #import <wtf/ios/WebCoreThread.h>
 #endif
 
@@ -145,7 +145,7 @@
         return;
     }
 
-#if PLATFORM(IOS_FAMILY)
+#if USE(WEB_THREAD)
     if (WebCoreWebThreadIsEnabled && WebCoreWebThreadIsEnabled()) {
         WebCoreWebThreadRun(block);
         return;

Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp (259710 => 259711)


--- trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp	2020-04-08 09:38:51 UTC (rev 259711)
@@ -44,7 +44,7 @@
 #include <sys/mman.h>
 #endif
 
-#if PLATFORM(IOS_FAMILY)
+#if HAVE(IOS_JIT_RESTRICTIONS)
 #include <wtf/cocoa/Entitlements.h>
 #endif
 
@@ -51,16 +51,6 @@
 #include "LinkBuffer.h"
 #include "MacroAssembler.h"
 
-#if PLATFORM(COCOA)
-#define HAVE_REMAP_JIT 1
-#endif
-
-#if HAVE(REMAP_JIT)
-#if CPU(ARM64) && PLATFORM(IOS_FAMILY)
-#define USE_EXECUTE_ONLY_JIT_WRITE_FUNCTION 1
-#endif
-#endif
-
 #if OS(DARWIN)
 #include <mach/mach.h>
 extern "C" {
@@ -124,7 +114,7 @@
 static bool isJITEnabled()
 {
     bool jitEnabled = !g_jscConfig.jitDisabled;
-#if PLATFORM(IOS_FAMILY) && (CPU(ARM64) || CPU(ARM))
+#if HAVE(IOS_JIT_RESTRICTIONS)
     return processHasEntitlement("dynamic-codesigning") && jitEnabled;
 #else
     return jitEnabled;
@@ -140,7 +130,7 @@
 
     g_jscConfig.jitDisabled = !enabled;
 
-#if PLATFORM(IOS_FAMILY) && (CPU(ARM64) || CPU(ARM))
+#if HAVE(IOS_JIT_RESTRICTIONS)
     if (!enabled) {
         // Because of an OS quirk, even after the JIT region has been unmapped,
         // the OS thinks that region is reserved, and as such, can cause Gigacage
@@ -168,7 +158,7 @@
 
 #if OS(DARWIN) && HAVE(REMAP_JIT)
 
-#if CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
+#if USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
 static ALWAYS_INLINE MacroAssemblerCodeRef<JITThunkPtrTag> jitWriteThunkGenerator(void* writableAddr, void* stubBase, size_t stubSize)
 {
     using namespace ARM64Registers;
@@ -240,7 +230,7 @@
     // asyncDisassembly option as our caller will set our pages execute only.
     return linkBuffer.finalizeCodeWithoutDisassembly<JITThunkPtrTag>();
 }
-#else // not CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
+#else // not USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
 static void genericWriteToJITRegion(off_t offset, const void* data, size_t dataSize)
 {
     memcpy((void*)(g_jscConfig.startOfFixedWritableMemoryPool + offset), data, dataSize);
@@ -259,7 +249,7 @@
     auto codePtr = MacroAssemblerCodePtr<JITThunkPtrTag>(tagCFunctionPtr<JITThunkPtrTag>(function));
     return MacroAssemblerCodeRef<JITThunkPtrTag>::createSelfManagedCodeRef(codePtr);
 }
-#endif // CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
+#endif // USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)
 
 static ALWAYS_INLINE void initializeSeparatedWXHeaps(void* stubBase, size_t stubSize, void* jitBase, size_t jitSize)
 {

Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (259710 => 259711)


--- trunk/Source/_javascript_Core/runtime/Options.cpp	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2020-04-08 09:38:51 UTC (rev 259711)
@@ -353,7 +353,7 @@
     Options::mediumHeapRAMFraction() = 0.9;
 #endif
 
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && defined(__LP64__)
+#if ENABLE(SIGILL_CRASH_ANALYZER)
     Options::useSigillCrashAnalyzer() = true;
 #endif
 

Modified: trunk/Source/WTF/ChangeLog (259710 => 259711)


--- trunk/Source/WTF/ChangeLog	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/WTF/ChangeLog	2020-04-08 09:38:51 UTC (rev 259711)
@@ -1,3 +1,14 @@
+2020-04-08  Tim Horton  <timothy_hor...@apple.com>
+
+        Rearrange and simplify some JSC feature flags
+        https://bugs.webkit.org/show_bug.cgi?id=210152
+
+        Reviewed by Saam Barati.
+
+        * wtf/PlatformEnableCocoa.h:
+        * wtf/PlatformHave.h:
+        * wtf/PlatformUse.h:
+
 2020-04-08  Philippe Normand  <pnorm...@igalia.com>
 
         [GTK][WPE] Release logs are unconditionally filling the journal

Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (259710 => 259711)


--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2020-04-08 09:38:51 UTC (rev 259711)
@@ -284,3 +284,7 @@
 #if !defined(ENABLE_CFPREFS_DIRECT_MODE)
 #define ENABLE_CFPREFS_DIRECT_MODE 1
 #endif
+
+#if !defined(ENABLE_SIGILL_CRASH_ANALYZER) && (PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS))
+#define ENABLE_SIGILL_CRASH_ANALYZER 1
+#endif

Modified: trunk/Source/WTF/wtf/PlatformHave.h (259710 => 259711)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-04-08 09:38:51 UTC (rev 259711)
@@ -56,6 +56,10 @@
 #define HAVE_OUT_OF_PROCESS_LAYER_HOSTING 1
 #endif
 
+#if PLATFORM(COCOA)
+#define HAVE_REMAP_JIT 1
+#endif
+
 #if PLATFORM(MAC)
 #define HAVE_RUNLOOP_TIMER 1
 #endif
@@ -661,3 +665,7 @@
 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
 #define HAVE_UISCENE_BASED_VIEW_SERVICE_STATE_NOTIFICATIONS 1
 #endif
+
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(MACCATALYST)
+#define HAVE_IOS_JIT_RESTRICTIONS 1
+#endif

Modified: trunk/Source/WTF/wtf/PlatformUse.h (259710 => 259711)


--- trunk/Source/WTF/wtf/PlatformUse.h	2020-04-08 09:28:49 UTC (rev 259710)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2020-04-08 09:38:51 UTC (rev 259711)
@@ -145,6 +145,10 @@
 #define USE_BUILTIN_FRAME_ADDRESS 1
 #endif
 
+#if PLATFORM(IOS_FAMILY) && CPU(ARM64) && HAVE(REMAP_JIT)
+#define USE_EXECUTE_ONLY_JIT_WRITE_FUNCTION 1
+#endif
+
 #if PLATFORM(IOS)
 #define USE_PASSKIT 1
 #endif
@@ -320,5 +324,3 @@
 #if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101600)
 #define USE_CTFONTTRANSFORMGLYPHSWITHLANGUAGE 1
 #endif
-
-#define USE_UTTYPE_SWIZZLER 0
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to