Title: [240370] trunk/Source
Revision
240370
Author
[email protected]
Date
2019-01-23 17:17:46 -0800 (Wed, 23 Jan 2019)

Log Message

ARM64E should not ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=193744
<rdar://problem/46262952>

Reviewed by Saam Barati.

Source/_javascript_Core:

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):

Source/WTF:

* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (240369 => 240370)


--- trunk/Source/_javascript_Core/ChangeLog	2019-01-24 01:08:31 UTC (rev 240369)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-01-24 01:17:46 UTC (rev 240370)
@@ -1,3 +1,14 @@
+2019-01-23  Mark Lam  <[email protected]>
+
+        ARM64E should not ENABLE(SEPARATED_WX_HEAP).
+        https://bugs.webkit.org/show_bug.cgi?id=193744
+        <rdar://problem/46262952>
+
+        Reviewed by Saam Barati.
+
+        * assembler/LinkBuffer.cpp:
+        (JSC::LinkBuffer::copyCompactAndLinkCode):
+
 2019-01-23  Yusuke Suzuki  <[email protected]>
 
         [DFG] AvailabilityMap::pruneByLiveness should make non-live operands Availability::unavailable instead of Availability()

Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp (240369 => 240370)


--- trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2019-01-24 01:08:31 UTC (rev 240369)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2019-01-24 01:17:46 UTC (rev 240370)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,10 +41,6 @@
 
 namespace JSC {
 
-#if ENABLE(SEPARATED_WX_HEAP)
-extern JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy;
-#endif // ENABLE(SEPARATED_WX_HEAP)
-
 bool shouldDumpDisassemblyFor(CodeBlock* codeBlock)
 {
     if (codeBlock && JITCode::isOptimizingJIT(codeBlock->jitType()) && Options::dumpDFGDisassembly())
@@ -120,14 +116,6 @@
 template <typename InstructionType>
 void LinkBuffer::copyCompactAndLinkCode(MacroAssembler& macroAssembler, void* ownerUID, JITCompilationEffort effort)
 {
-#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
-#if ENABLE(SEPARATED_WX_HEAP)
-    const bool isUsingFastPermissionsJITCopy = useFastPermisionsJITCopy;
-#else
-    const bool isUsingFastPermissionsJITCopy = true;
-#endif
-#endif
-
     allocate(macroAssembler, ownerUID, effort);
     const size_t initialSize = macroAssembler.m_assembler.codeSize();
     if (didFailToAllocate())
@@ -142,11 +130,6 @@
     const uint32_t expectedFinalHash = macroAssembler.m_assembler.buffer().hash().finalHash();
     ARM64EHash verifyUncompactedHash;
     uint8_t* outData = codeOutData;
-#if ENABLE(SEPARATED_WX_HEAP)
-    AssemblerData outBuffer(m_size);
-    if (!isUsingFastPermissionsJITCopy)
-        outData = reinterpret_cast<uint8_t*>(outBuffer.buffer());
-#endif // ENABLE(SEPARATED_WX_HEAP)
 #else
     AssemblerData outBuffer(m_size);
     uint8_t* outData = reinterpret_cast<uint8_t*>(outBuffer.buffer());
@@ -161,8 +144,7 @@
     unsigned jumpCount = jumpsToLink.size();
 
 #if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
-    if (isUsingFastPermissionsJITCopy)
-        os_thread_self_restrict_rwx_to_rw();
+    os_thread_self_restrict_rwx_to_rw();
 #endif
 
     if (m_shouldPerformBranchCompaction) {
@@ -249,8 +231,6 @@
     for (unsigned i = 0; i < jumpCount; ++i) {
 #if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
         auto memcpyFunction = memcpy;
-        if (!isUsingFastPermissionsJITCopy)
-            memcpyFunction = performJITMemcpy;
 #else
         auto memcpyFunction = performJITMemcpy;
 #endif
@@ -267,8 +247,7 @@
     }
 
 #if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
-    if (isUsingFastPermissionsJITCopy)
-        os_thread_self_restrict_rwx_to_rx();
+    os_thread_self_restrict_rwx_to_rx();
 #endif
 
     if (m_executableMemory) {
@@ -280,12 +259,7 @@
     ASSERT(codeOutData != outData);
     performJITMemcpy(codeOutData, outData, m_size);
 #else
-    if (isUsingFastPermissionsJITCopy)
-        ASSERT(codeOutData == outData);
-    else {
-        ASSERT(codeOutData != outData);
-        performJITMemcpy(codeOutData, outData, m_size);
-    }
+    ASSERT(codeOutData == outData);
 #endif
 
     jumpsToLink.clear();

Modified: trunk/Source/WTF/ChangeLog (240369 => 240370)


--- trunk/Source/WTF/ChangeLog	2019-01-24 01:08:31 UTC (rev 240369)
+++ trunk/Source/WTF/ChangeLog	2019-01-24 01:17:46 UTC (rev 240370)
@@ -1,3 +1,13 @@
+2019-01-23  Mark Lam  <[email protected]>
+
+        ARM64E should not ENABLE(SEPARATED_WX_HEAP).
+        https://bugs.webkit.org/show_bug.cgi?id=193744
+        <rdar://problem/46262952>
+
+        Reviewed by Saam Barati.
+
+        * wtf/Platform.h:
+
 2019-01-23  David Kilzer  <[email protected]>
 
         Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}

Modified: trunk/Source/WTF/wtf/Platform.h (240369 => 240370)


--- trunk/Source/WTF/wtf/Platform.h	2019-01-24 01:08:31 UTC (rev 240369)
+++ trunk/Source/WTF/wtf/Platform.h	2019-01-24 01:17:46 UTC (rev 240370)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2018 Apple Inc. All rights reserved.
+ * 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.
  *
@@ -958,13 +958,11 @@
 #define JIT_OPERATION
 #endif
 
-#ifndef ENABLE_SEPARATED_WX_HEAP
-#if (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E)) && PLATFORM(IOS_FAMILY) && CPU(ARM64)
+#if PLATFORM(IOS_FAMILY) && CPU(ARM64) && (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E))
 #define ENABLE_SEPARATED_WX_HEAP 1
 #else
 #define ENABLE_SEPARATED_WX_HEAP 0
 #endif
-#endif
 
 /* Configure the interpreter */
 #if COMPILER(GCC_COMPATIBLE)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to