Title: [198252] trunk/Source/_javascript_Core
Revision
198252
Author
oli...@apple.com
Date
2016-03-15 18:02:32 -0700 (Tue, 15 Mar 2016)

Log Message

Rename performJITMemcpy to something more inline with our normal webkit function names
https://bugs.webkit.org/show_bug.cgi?id=155525

Reviewed by Saam Barati.

Simple bulk search/replace with a better name.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::fillNops):
(JSC::ARM64Assembler::replaceWithJump):
(JSC::ARM64Assembler::replaceWithLoad):
(JSC::ARM64Assembler::replaceWithAddressComputation):
(JSC::ARM64Assembler::setPointer):
(JSC::ARM64Assembler::repatchInt32):
(JSC::ARM64Assembler::repatchCompact):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
* jit/ExecutableAllocator.h:
(JSC::writeToExecutableRegion):
(JSC::performJITMemcpy): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (198251 => 198252)


--- trunk/Source/_javascript_Core/ChangeLog	2016-03-16 00:45:32 UTC (rev 198251)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-03-16 01:02:32 UTC (rev 198252)
@@ -1,5 +1,32 @@
 2016-03-15  Oliver Hunt  <oli...@apple.com>
 
+        Rename performJITMemcpy to something more inline with our normal webkit function names
+        https://bugs.webkit.org/show_bug.cgi?id=155525
+
+        Reviewed by Saam Barati.
+
+        Simple bulk search/replace with a better name.
+
+        * assembler/ARM64Assembler.h:
+        (JSC::ARM64Assembler::fillNops):
+        (JSC::ARM64Assembler::replaceWithJump):
+        (JSC::ARM64Assembler::replaceWithLoad):
+        (JSC::ARM64Assembler::replaceWithAddressComputation):
+        (JSC::ARM64Assembler::setPointer):
+        (JSC::ARM64Assembler::repatchInt32):
+        (JSC::ARM64Assembler::repatchCompact):
+        (JSC::ARM64Assembler::linkJumpOrCall):
+        (JSC::ARM64Assembler::linkCompareAndBranch):
+        (JSC::ARM64Assembler::linkConditionalBranch):
+        (JSC::ARM64Assembler::linkTestAndBranch):
+        * assembler/LinkBuffer.cpp:
+        (JSC::LinkBuffer::copyCompactAndLinkCode):
+        * jit/ExecutableAllocator.h:
+        (JSC::writeToExecutableRegion):
+        (JSC::performJITMemcpy): Deleted.
+
+2016-03-15  Oliver Hunt  <oli...@apple.com>
+
         Build fix.
 
         * jit/ExecutableAllocatorFixedVMPool.cpp:

Modified: trunk/Source/_javascript_Core/assembler/ARM64Assembler.h (198251 => 198252)


--- trunk/Source/_javascript_Core/assembler/ARM64Assembler.h	2016-03-16 00:45:32 UTC (rev 198251)
+++ trunk/Source/_javascript_Core/assembler/ARM64Assembler.h	2016-03-16 01:02:32 UTC (rev 198252)
@@ -1490,7 +1490,7 @@
         size_t n = size / sizeof(int32_t);
         for (int32_t* ptr = static_cast<int32_t*>(base); n--;) {
             int insn = nopPseudo();
-            performJITMemcpy(ptr++, &insn, sizeof(int));
+            writeToExecutableRegion(ptr++, &insn, sizeof(int));
         }
     }
     
@@ -2501,7 +2501,7 @@
         intptr_t offset = (reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(where)) >> 2;
         ASSERT(static_cast<int>(offset) == offset);
         int insn = unconditionalBranchImmediate(false, static_cast<int>(offset));
-        performJITMemcpy(where, &insn, sizeof(int));
+        writeToExecutableRegion(where, &insn, sizeof(int));
         cacheFlush(where, sizeof(int));
     }
     
@@ -2526,7 +2526,7 @@
             ASSERT(!shift);
             ASSERT(!(imm12 & ~0xff8));
             int insn = loadStoreRegisterUnsignedImmediate(MemOpSize_64, false, MemOp_LOAD, encodePositiveImmediate<64>(imm12), rn, rd);
-            performJITMemcpy(where, &insn, sizeof(int));
+            writeToExecutableRegion(where, &insn, sizeof(int));
             cacheFlush(where, sizeof(int));
         }
 #if !ASSERT_DISABLED
@@ -2560,7 +2560,7 @@
             ASSERT(opc == MemOp_LOAD);
             ASSERT(!(imm12 & ~0x1ff));
             int insn = addSubtractImmediate(Datasize_64, AddOp_ADD, DontSetFlags, 0, imm12 * sizeof(void*), rn, rt);
-            performJITMemcpy(where, &insn, sizeof(int));
+            writeToExecutableRegion(where, &insn, sizeof(int));
             cacheFlush(where, sizeof(int));
         }
 #if !ASSERT_DISABLED
@@ -2594,7 +2594,7 @@
         buffer[0] = moveWideImediate(Datasize_64, MoveWideOp_Z, 0, getHalfword(value, 0), rd);
         buffer[1] = moveWideImediate(Datasize_64, MoveWideOp_K, 1, getHalfword(value, 1), rd);
         buffer[2] = moveWideImediate(Datasize_64, MoveWideOp_K, 2, getHalfword(value, 2), rd);
-        performJITMemcpy(address, buffer, sizeof(int) * 3);
+        writeToExecutableRegion(address, buffer, sizeof(int) * 3);
 
         if (flush)
             cacheFlush(address, sizeof(int) * 3);
@@ -2621,7 +2621,7 @@
             buffer[0] = moveWideImediate(Datasize_32, MoveWideOp_N, 0, ~getHalfword(value, 0), rd);
             buffer[1] = moveWideImediate(Datasize_32, MoveWideOp_K, 1, getHalfword(value, 1), rd);
         }
-        performJITMemcpy(where, &buffer, sizeof(int) * 2);
+        writeToExecutableRegion(where, &buffer, sizeof(int) * 2);
 
         cacheFlush(where, sizeof(int) * 2);
     }
@@ -2686,7 +2686,7 @@
         else
             imm12 = encodePositiveImmediate<64>(value);
         int insn = loadStoreRegisterUnsignedImmediate(size, V, opc, imm12, rn, rt);
-        performJITMemcpy(where, &insn, sizeof(int));
+        writeToExecutableRegion(where, &insn, sizeof(int));
 
         cacheFlush(where, sizeof(int));
     }
@@ -2884,7 +2884,7 @@
         ASSERT(static_cast<int>(offset) == offset);
 
         int insn = unconditionalBranchImmediate(isCall, static_cast<int>(offset));
-        performJITMemcpy(from, &insn, sizeof(int));
+        writeToExecutableRegion(from, &insn, sizeof(int));
     }
 
     template<bool isDirect>
@@ -2900,14 +2900,14 @@
 
         if (useDirect || isDirect) {
             int insn = compareAndBranchImmediate(is64Bit ? Datasize_64 : Datasize_32, condition == ConditionNE, static_cast<int>(offset), rt);
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             if (!isDirect) {
                 insn = nopPseudo();
-                performJITMemcpy(from + 1, &insn, sizeof(int));
+                writeToExecutableRegion(from + 1, &insn, sizeof(int));
             }
         } else {
             int insn = compareAndBranchImmediate(is64Bit ? Datasize_64 : Datasize_32, invert(condition) == ConditionNE, 2, rt);
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             linkJumpOrCall<false>(from + 1, to);
         }
     }
@@ -2925,14 +2925,14 @@
 
         if (useDirect || isDirect) {
             int insn = conditionalBranchImmediate(static_cast<int>(offset), condition);
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             if (!isDirect) {
                 insn = nopPseudo();
-                performJITMemcpy(from + 1, &insn, sizeof(int));
+                writeToExecutableRegion(from + 1, &insn, sizeof(int));
             }
         } else {
             int insn = conditionalBranchImmediate(2, invert(condition));
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             linkJumpOrCall<false>(from + 1, to);
         }
     }
@@ -2951,14 +2951,14 @@
 
         if (useDirect || isDirect) {
             int insn = testAndBranchImmediate(condition == ConditionNE, static_cast<int>(bitNumber), static_cast<int>(offset), rt);
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             if (!isDirect) {
                 insn = nopPseudo();
-                performJITMemcpy(from + 1, &insn, sizeof(int));
+                writeToExecutableRegion(from + 1, &insn, sizeof(int));
             }
         } else {
             int insn = testAndBranchImmediate(invert(condition) == ConditionNE, static_cast<int>(bitNumber), 2, rt);
-            performJITMemcpy(from, &insn, sizeof(int));
+            writeToExecutableRegion(from, &insn, sizeof(int));
             linkJumpOrCall<false>(from + 1, to);
         }
     }

Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp (198251 => 198252)


--- trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2016-03-16 00:45:32 UTC (rev 198251)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2016-03-16 01:02:32 UTC (rev 198252)
@@ -163,7 +163,7 @@
     jumpsToLink.clear();
     shrink(writePtr + m_initialSize - readPtr);
 
-    performJITMemcpy(m_code, outBuffer.buffer(), m_size);
+    writeToExecutableRegion(m_code, outBuffer.buffer(), m_size);
 
 #if DUMP_LINK_STATISTICS
     dumpLinkStatistics(m_code, m_initialSize, m_size);

Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocator.h (198251 => 198252)


--- trunk/Source/_javascript_Core/jit/ExecutableAllocator.h	2016-03-16 00:45:32 UTC (rev 198251)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocator.h	2016-03-16 01:02:32 UTC (rev 198252)
@@ -95,7 +95,7 @@
 typedef void (*JITWriteFunction)(off_t, const void*, size_t);
 extern JS_EXPORTDATA JITWriteFunction jitWriteFunction;
 
-static inline void* performJITMemcpy(void *dst, const void *src, size_t n)
+static inline void* writeToExecutableRegion(void *dst, const void *src, size_t n)
 {
     // Use execute-only write thunk for writes inside the JIT region. This is a variant of
     // memcpy that takes an offset into the JIT region as its destination (first) parameter.
@@ -110,7 +110,7 @@
 }
 
 #else // ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
-static inline void* performJITMemcpy(void *dst, const void *src, size_t n)
+static inline void* writeToExecutableRegion(void *dst, const void *src, size_t n)
 {
     return memcpy(dst, src, n);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to