Title: [283022] branches/safari-612-branch/Source
Revision
283022
Author
[email protected]
Date
2021-09-23 19:57:54 -0700 (Thu, 23 Sep 2021)

Log Message

Cherry-pick r281910. rdar://problem/83429926

    Add more support for JIT operation validation testing.
    https://bugs.webkit.org/show_bug.cgi?id=229534
    rdar://81526335

    Reviewed by Saam Barati.

    Source/bmalloc:

    * bmalloc/Gigacage.cpp:
    (Gigacage::ensureGigacage):
    * bmalloc/GigacageConfig.h:

    Source/_javascript_Core:

    1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
       operation validation.

    2. Introduce a JITOperationAnnotation struct to record JIT operation function
       pointers, with an extra pointer field for a validation test function.

    3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
       instead of just a single operation pointer.

    4. Converted the static addPointers() function in JITOperationList.cpp into a
       member function of JITOperationList.  This allows for the code to be more
       terse, as well as enables the use of an inverse map mechanism on debug builds
       only.

    5. Added more macros to help differentiate between different types of JIT
       operation functions.

    6. Made all JIT operation functions use extern "C" linkage to make it possible to
       write validation tests in assembly so that we can run them on a release build
       as well without taking too much time.

    * CMakeLists.txt:
    * _javascript_Core.xcodeproj/project.pbxproj:
    * assembler/JITOperationList.cpp:
    (JSC::JITOperationList::addInverseMap):
    (JSC::JITOperationList::addPointers):
    (JSC::JITOperationList::populatePointersInJavaScriptCore):
    (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
    (JSC::JITOperationList::populatePointersInEmbedder):
    (JSC::addPointers): Deleted.
    * assembler/JITOperationList.h:
    (JSC::JITOperationList::map const):
    (JSC::JITOperationList::inverseMap const):
    (JSC::JITOperationList::assertIsJITOperation):
    (JSC::JITOperationList::assertIsJITOperationWithvalidation):
    * assembler/JITOperationValidation.h: Added.
    * assembler/MacroAssemblerARM64.cpp:
    * assembler/MacroAssemblerARM64.h:
    * assembler/MacroAssemblerARM64E.h:
    * assembler/MacroAssemblerARMv7.cpp:
    * assembler/MacroAssemblerMIPS.cpp:
    * assembler/MacroAssemblerX86Common.cpp:
    * b3/testb3.h:
    * b3/testb3_1.cpp:
    * b3/testb3_5.cpp:
    * b3/testb3_7.cpp:
    * dfg/DFGOSRExit.h:
    * ftl/FTLLowerDFGToB3.cpp:
    * jit/ExecutableAllocator.cpp:
    (JSC::initializeJITPageReservation):
    * jit/Repatch.cpp:
    (JSC::retagOperationWithValidation):
    (JSC::retagCallTargetWithValidation):
    (JSC::readPutICCallTarget):
    * jit/ThunkGenerators.cpp:
    * jsc.cpp:
    * llint/LLIntData.cpp:
    * llint/LLIntThunks.cpp:
    * runtime/CommonSlowPaths.h:
    * runtime/JSCPtrTag.h:
    (JSC::tagJSCCodePtrImpl):
    (JSC::untagJSCCodePtrImpl):
    (JSC::isTaggedJSCCodePtrImpl):
    * runtime/MathCommon.h:
    * runtime/Options.cpp:
    (JSC::canUseJITCage):
    * tools/JSDollarVM.cpp:
    * yarr/YarrJIT.cpp:

    Source/WebCore:

    * bindings/js/WebCoreJITOperations.cpp:
    * bindings/scripts/CodeGeneratorJS.pm:
    (GenerateImplementation):
    * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
    (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
    * cssjit/SelectorCompiler.cpp:
    * testing/js/WebCoreTestSupport.cpp:

    Source/WTF:

    * wtf/PlatformCallingConventions.h:
    * wtf/PtrTag.h:
    (WTF::PtrTagTraits::isTagged):
    (WTF::isTaggedNativeCodePtrImpl):
    (WTF::isTaggedWith):
    (WTF::assertIsTaggedWith):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/_javascript_Core/ChangeLog (283021 => 283022)


--- branches/safari-612-branch/Source/_javascript_Core/ChangeLog	2021-09-24 02:57:50 UTC (rev 283021)
+++ branches/safari-612-branch/Source/_javascript_Core/ChangeLog	2021-09-24 02:57:54 UTC (rev 283022)
@@ -185,6 +185,193 @@
             * tools/JSDollarVM.cpp:
             * yarr/YarrJIT.cpp:
 
+2021-09-23  Russell Epstein  <[email protected]>
+
+        Cherry-pick r281910. rdar://problem/83429926
+
+    Add more support for JIT operation validation testing.
+    https://bugs.webkit.org/show_bug.cgi?id=229534
+    rdar://81526335
+    
+    Reviewed by Saam Barati.
+    
+    Source/bmalloc:
+    
+    * bmalloc/Gigacage.cpp:
+    (Gigacage::ensureGigacage):
+    * bmalloc/GigacageConfig.h:
+    
+    Source/_javascript_Core:
+    
+    1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
+       operation validation.
+    
+    2. Introduce a JITOperationAnnotation struct to record JIT operation function
+       pointers, with an extra pointer field for a validation test function.
+    
+    3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
+       instead of just a single operation pointer.
+    
+    4. Converted the static addPointers() function in JITOperationList.cpp into a
+       member function of JITOperationList.  This allows for the code to be more
+       terse, as well as enables the use of an inverse map mechanism on debug builds
+       only.
+    
+    5. Added more macros to help differentiate between different types of JIT
+       operation functions.
+    
+    6. Made all JIT operation functions use extern "C" linkage to make it possible to
+       write validation tests in assembly so that we can run them on a release build
+       as well without taking too much time.
+    
+    * CMakeLists.txt:
+    * _javascript_Core.xcodeproj/project.pbxproj:
+    * assembler/JITOperationList.cpp:
+    (JSC::JITOperationList::addInverseMap):
+    (JSC::JITOperationList::addPointers):
+    (JSC::JITOperationList::populatePointersInJavaScriptCore):
+    (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
+    (JSC::JITOperationList::populatePointersInEmbedder):
+    (JSC::addPointers): Deleted.
+    * assembler/JITOperationList.h:
+    (JSC::JITOperationList::map const):
+    (JSC::JITOperationList::inverseMap const):
+    (JSC::JITOperationList::assertIsJITOperation):
+    (JSC::JITOperationList::assertIsJITOperationWithvalidation):
+    * assembler/JITOperationValidation.h: Added.
+    * assembler/MacroAssemblerARM64.cpp:
+    * assembler/MacroAssemblerARM64.h:
+    * assembler/MacroAssemblerARM64E.h:
+    * assembler/MacroAssemblerARMv7.cpp:
+    * assembler/MacroAssemblerMIPS.cpp:
+    * assembler/MacroAssemblerX86Common.cpp:
+    * b3/testb3.h:
+    * b3/testb3_1.cpp:
+    * b3/testb3_5.cpp:
+    * b3/testb3_7.cpp:
+    * dfg/DFGOSRExit.h:
+    * ftl/FTLLowerDFGToB3.cpp:
+    * jit/ExecutableAllocator.cpp:
+    (JSC::initializeJITPageReservation):
+    * jit/Repatch.cpp:
+    (JSC::retagOperationWithValidation):
+    (JSC::retagCallTargetWithValidation):
+    (JSC::readPutICCallTarget):
+    * jit/ThunkGenerators.cpp:
+    * jsc.cpp:
+    * llint/LLIntData.cpp:
+    * llint/LLIntThunks.cpp:
+    * runtime/CommonSlowPaths.h:
+    * runtime/JSCPtrTag.h:
+    (JSC::tagJSCCodePtrImpl):
+    (JSC::untagJSCCodePtrImpl):
+    (JSC::isTaggedJSCCodePtrImpl):
+    * runtime/MathCommon.h:
+    * runtime/Options.cpp:
+    (JSC::canUseJITCage):
+    * tools/JSDollarVM.cpp:
+    * yarr/YarrJIT.cpp:
+    
+    Source/WebCore:
+    
+    * bindings/js/WebCoreJITOperations.cpp:
+    * bindings/scripts/CodeGeneratorJS.pm:
+    (GenerateImplementation):
+    * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+    (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
+    * cssjit/SelectorCompiler.cpp:
+    * testing/js/WebCoreTestSupport.cpp:
+    
+    Source/WTF:
+    
+    * wtf/PlatformCallingConventions.h:
+    * wtf/PtrTag.h:
+    (WTF::PtrTagTraits::isTagged):
+    (WTF::isTaggedNativeCodePtrImpl):
+    (WTF::isTaggedWith):
+    (WTF::assertIsTaggedWith):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-02  Mark Lam  <[email protected]>
+
+            Add more support for JIT operation validation testing.
+            https://bugs.webkit.org/show_bug.cgi?id=229534
+            rdar://81526335
+
+            Reviewed by Saam Barati.
+
+            1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
+               operation validation.
+
+            2. Introduce a JITOperationAnnotation struct to record JIT operation function
+               pointers, with an extra pointer field for a validation test function.
+
+            3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
+               instead of just a single operation pointer.
+
+            4. Converted the static addPointers() function in JITOperationList.cpp into a
+               member function of JITOperationList.  This allows for the code to be more
+               terse, as well as enables the use of an inverse map mechanism on debug builds
+               only.
+
+            5. Added more macros to help differentiate between different types of JIT
+               operation functions.
+
+            6. Made all JIT operation functions use extern "C" linkage to make it possible to
+               write validation tests in assembly so that we can run them on a release build
+               as well without taking too much time.
+
+            * CMakeLists.txt:
+            * _javascript_Core.xcodeproj/project.pbxproj:
+            * assembler/JITOperationList.cpp:
+            (JSC::JITOperationList::addInverseMap):
+            (JSC::JITOperationList::addPointers):
+            (JSC::JITOperationList::populatePointersInJavaScriptCore):
+            (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
+            (JSC::JITOperationList::populatePointersInEmbedder):
+            (JSC::addPointers): Deleted.
+            * assembler/JITOperationList.h:
+            (JSC::JITOperationList::map const):
+            (JSC::JITOperationList::inverseMap const):
+            (JSC::JITOperationList::assertIsJITOperation):
+            (JSC::JITOperationList::assertIsJITOperationWithvalidation):
+            * assembler/JITOperationValidation.h: Added.
+            * assembler/MacroAssemblerARM64.cpp:
+            * assembler/MacroAssemblerARM64.h:
+            * assembler/MacroAssemblerARM64E.h:
+            * assembler/MacroAssemblerARMv7.cpp:
+            * assembler/MacroAssemblerMIPS.cpp:
+            * assembler/MacroAssemblerX86Common.cpp:
+            * b3/testb3.h:
+            * b3/testb3_1.cpp:
+            * b3/testb3_5.cpp:
+            * b3/testb3_7.cpp:
+            * dfg/DFGOSRExit.h:
+            * ftl/FTLLowerDFGToB3.cpp:
+            * jit/ExecutableAllocator.cpp:
+            (JSC::initializeJITPageReservation):
+            * jit/Repatch.cpp:
+            (JSC::retagOperationWithValidation):
+            (JSC::retagCallTargetWithValidation):
+            (JSC::readPutICCallTarget):
+            * jit/ThunkGenerators.cpp:
+            * jsc.cpp:
+            * llint/LLIntData.cpp:
+            * llint/LLIntThunks.cpp:
+            * runtime/CommonSlowPaths.h:
+            * runtime/JSCPtrTag.h:
+            (JSC::tagJSCCodePtrImpl):
+            (JSC::untagJSCCodePtrImpl):
+            (JSC::isTaggedJSCCodePtrImpl):
+            * runtime/MathCommon.h:
+            * runtime/Options.cpp:
+            (JSC::canUseJITCage):
+            * tools/JSDollarVM.cpp:
+            * yarr/YarrJIT.cpp:
+
 2021-09-23  Alan Coon  <[email protected]>
 
         Cherry-pick r282009. rdar://problem/83430109

Modified: branches/safari-612-branch/Source/WTF/ChangeLog (283021 => 283022)


--- branches/safari-612-branch/Source/WTF/ChangeLog	2021-09-24 02:57:50 UTC (rev 283021)
+++ branches/safari-612-branch/Source/WTF/ChangeLog	2021-09-24 02:57:54 UTC (rev 283022)
@@ -123,6 +123,131 @@
             (WTF::isTaggedWith):
             (WTF::assertIsTaggedWith):
 
+2021-09-23  Russell Epstein  <[email protected]>
+
+        Cherry-pick r281910. rdar://problem/83429926
+
+    Add more support for JIT operation validation testing.
+    https://bugs.webkit.org/show_bug.cgi?id=229534
+    rdar://81526335
+    
+    Reviewed by Saam Barati.
+    
+    Source/bmalloc:
+    
+    * bmalloc/Gigacage.cpp:
+    (Gigacage::ensureGigacage):
+    * bmalloc/GigacageConfig.h:
+    
+    Source/_javascript_Core:
+    
+    1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
+       operation validation.
+    
+    2. Introduce a JITOperationAnnotation struct to record JIT operation function
+       pointers, with an extra pointer field for a validation test function.
+    
+    3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
+       instead of just a single operation pointer.
+    
+    4. Converted the static addPointers() function in JITOperationList.cpp into a
+       member function of JITOperationList.  This allows for the code to be more
+       terse, as well as enables the use of an inverse map mechanism on debug builds
+       only.
+    
+    5. Added more macros to help differentiate between different types of JIT
+       operation functions.
+    
+    6. Made all JIT operation functions use extern "C" linkage to make it possible to
+       write validation tests in assembly so that we can run them on a release build
+       as well without taking too much time.
+    
+    * CMakeLists.txt:
+    * _javascript_Core.xcodeproj/project.pbxproj:
+    * assembler/JITOperationList.cpp:
+    (JSC::JITOperationList::addInverseMap):
+    (JSC::JITOperationList::addPointers):
+    (JSC::JITOperationList::populatePointersInJavaScriptCore):
+    (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
+    (JSC::JITOperationList::populatePointersInEmbedder):
+    (JSC::addPointers): Deleted.
+    * assembler/JITOperationList.h:
+    (JSC::JITOperationList::map const):
+    (JSC::JITOperationList::inverseMap const):
+    (JSC::JITOperationList::assertIsJITOperation):
+    (JSC::JITOperationList::assertIsJITOperationWithvalidation):
+    * assembler/JITOperationValidation.h: Added.
+    * assembler/MacroAssemblerARM64.cpp:
+    * assembler/MacroAssemblerARM64.h:
+    * assembler/MacroAssemblerARM64E.h:
+    * assembler/MacroAssemblerARMv7.cpp:
+    * assembler/MacroAssemblerMIPS.cpp:
+    * assembler/MacroAssemblerX86Common.cpp:
+    * b3/testb3.h:
+    * b3/testb3_1.cpp:
+    * b3/testb3_5.cpp:
+    * b3/testb3_7.cpp:
+    * dfg/DFGOSRExit.h:
+    * ftl/FTLLowerDFGToB3.cpp:
+    * jit/ExecutableAllocator.cpp:
+    (JSC::initializeJITPageReservation):
+    * jit/Repatch.cpp:
+    (JSC::retagOperationWithValidation):
+    (JSC::retagCallTargetWithValidation):
+    (JSC::readPutICCallTarget):
+    * jit/ThunkGenerators.cpp:
+    * jsc.cpp:
+    * llint/LLIntData.cpp:
+    * llint/LLIntThunks.cpp:
+    * runtime/CommonSlowPaths.h:
+    * runtime/JSCPtrTag.h:
+    (JSC::tagJSCCodePtrImpl):
+    (JSC::untagJSCCodePtrImpl):
+    (JSC::isTaggedJSCCodePtrImpl):
+    * runtime/MathCommon.h:
+    * runtime/Options.cpp:
+    (JSC::canUseJITCage):
+    * tools/JSDollarVM.cpp:
+    * yarr/YarrJIT.cpp:
+    
+    Source/WebCore:
+    
+    * bindings/js/WebCoreJITOperations.cpp:
+    * bindings/scripts/CodeGeneratorJS.pm:
+    (GenerateImplementation):
+    * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+    (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
+    * cssjit/SelectorCompiler.cpp:
+    * testing/js/WebCoreTestSupport.cpp:
+    
+    Source/WTF:
+    
+    * wtf/PlatformCallingConventions.h:
+    * wtf/PtrTag.h:
+    (WTF::PtrTagTraits::isTagged):
+    (WTF::isTaggedNativeCodePtrImpl):
+    (WTF::isTaggedWith):
+    (WTF::assertIsTaggedWith):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-02  Mark Lam  <[email protected]>
+
+            Add more support for JIT operation validation testing.
+            https://bugs.webkit.org/show_bug.cgi?id=229534
+            rdar://81526335
+
+            Reviewed by Saam Barati.
+
+            * wtf/PlatformCallingConventions.h:
+            * wtf/PtrTag.h:
+            (WTF::PtrTagTraits::isTagged):
+            (WTF::isTaggedNativeCodePtrImpl):
+            (WTF::isTaggedWith):
+            (WTF::assertIsTaggedWith):
+
 2021-09-23  Alan Coon  <[email protected]>
 
         Cherry-pick r282881. rdar://problem/83430003

Modified: branches/safari-612-branch/Source/WTF/wtf/PtrTag.h (283021 => 283022)


--- branches/safari-612-branch/Source/WTF/wtf/PtrTag.h	2021-09-24 02:57:50 UTC (rev 283021)
+++ branches/safari-612-branch/Source/WTF/wtf/PtrTag.h	2021-09-24 02:57:54 UTC (rev 283022)
@@ -353,6 +353,17 @@
 }
 
 template<PtrTag tag, typename PtrType>
+ALWAYS_INLINE static bool isTaggedNativeCodePtrImpl(PtrType ptr)
+{
+#if CPU(ARM64E)
+    return ptr == tagNativeCodePtrImpl<tag>(removeCodePtrTag(ptr));
+#else
+    UNUSED_PARAM(ptr);
+    return true;
+#endif
+}
+
+template<PtrTag tag, typename PtrType>
 bool isTaggedWith(PtrType value)
 {
     void* ptr = bitwise_cast<void*>(value);

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (283021 => 283022)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-24 02:57:50 UTC (rev 283021)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-24 02:57:54 UTC (rev 283022)
@@ -126,6 +126,132 @@
 
 2021-09-23  Russell Epstein  <[email protected]>
 
+        Cherry-pick r281910. rdar://problem/83429926
+
+    Add more support for JIT operation validation testing.
+    https://bugs.webkit.org/show_bug.cgi?id=229534
+    rdar://81526335
+    
+    Reviewed by Saam Barati.
+    
+    Source/bmalloc:
+    
+    * bmalloc/Gigacage.cpp:
+    (Gigacage::ensureGigacage):
+    * bmalloc/GigacageConfig.h:
+    
+    Source/_javascript_Core:
+    
+    1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
+       operation validation.
+    
+    2. Introduce a JITOperationAnnotation struct to record JIT operation function
+       pointers, with an extra pointer field for a validation test function.
+    
+    3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
+       instead of just a single operation pointer.
+    
+    4. Converted the static addPointers() function in JITOperationList.cpp into a
+       member function of JITOperationList.  This allows for the code to be more
+       terse, as well as enables the use of an inverse map mechanism on debug builds
+       only.
+    
+    5. Added more macros to help differentiate between different types of JIT
+       operation functions.
+    
+    6. Made all JIT operation functions use extern "C" linkage to make it possible to
+       write validation tests in assembly so that we can run them on a release build
+       as well without taking too much time.
+    
+    * CMakeLists.txt:
+    * _javascript_Core.xcodeproj/project.pbxproj:
+    * assembler/JITOperationList.cpp:
+    (JSC::JITOperationList::addInverseMap):
+    (JSC::JITOperationList::addPointers):
+    (JSC::JITOperationList::populatePointersInJavaScriptCore):
+    (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
+    (JSC::JITOperationList::populatePointersInEmbedder):
+    (JSC::addPointers): Deleted.
+    * assembler/JITOperationList.h:
+    (JSC::JITOperationList::map const):
+    (JSC::JITOperationList::inverseMap const):
+    (JSC::JITOperationList::assertIsJITOperation):
+    (JSC::JITOperationList::assertIsJITOperationWithvalidation):
+    * assembler/JITOperationValidation.h: Added.
+    * assembler/MacroAssemblerARM64.cpp:
+    * assembler/MacroAssemblerARM64.h:
+    * assembler/MacroAssemblerARM64E.h:
+    * assembler/MacroAssemblerARMv7.cpp:
+    * assembler/MacroAssemblerMIPS.cpp:
+    * assembler/MacroAssemblerX86Common.cpp:
+    * b3/testb3.h:
+    * b3/testb3_1.cpp:
+    * b3/testb3_5.cpp:
+    * b3/testb3_7.cpp:
+    * dfg/DFGOSRExit.h:
+    * ftl/FTLLowerDFGToB3.cpp:
+    * jit/ExecutableAllocator.cpp:
+    (JSC::initializeJITPageReservation):
+    * jit/Repatch.cpp:
+    (JSC::retagOperationWithValidation):
+    (JSC::retagCallTargetWithValidation):
+    (JSC::readPutICCallTarget):
+    * jit/ThunkGenerators.cpp:
+    * jsc.cpp:
+    * llint/LLIntData.cpp:
+    * llint/LLIntThunks.cpp:
+    * runtime/CommonSlowPaths.h:
+    * runtime/JSCPtrTag.h:
+    (JSC::tagJSCCodePtrImpl):
+    (JSC::untagJSCCodePtrImpl):
+    (JSC::isTaggedJSCCodePtrImpl):
+    * runtime/MathCommon.h:
+    * runtime/Options.cpp:
+    (JSC::canUseJITCage):
+    * tools/JSDollarVM.cpp:
+    * yarr/YarrJIT.cpp:
+    
+    Source/WebCore:
+    
+    * bindings/js/WebCoreJITOperations.cpp:
+    * bindings/scripts/CodeGeneratorJS.pm:
+    (GenerateImplementation):
+    * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+    (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
+    * cssjit/SelectorCompiler.cpp:
+    * testing/js/WebCoreTestSupport.cpp:
+    
+    Source/WTF:
+    
+    * wtf/PlatformCallingConventions.h:
+    * wtf/PtrTag.h:
+    (WTF::PtrTagTraits::isTagged):
+    (WTF::isTaggedNativeCodePtrImpl):
+    (WTF::isTaggedWith):
+    (WTF::assertIsTaggedWith):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-02  Mark Lam  <[email protected]>
+
+            Add more support for JIT operation validation testing.
+            https://bugs.webkit.org/show_bug.cgi?id=229534
+            rdar://81526335
+
+            Reviewed by Saam Barati.
+
+            * bindings/js/WebCoreJITOperations.cpp:
+            * bindings/scripts/CodeGeneratorJS.pm:
+            (GenerateImplementation):
+            * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+            (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
+            * cssjit/SelectorCompiler.cpp:
+            * testing/js/WebCoreTestSupport.cpp:
+
+2021-09-23  Russell Epstein  <[email protected]>
+
         Cherry-pick r282046. rdar://problem/83463331
 
     [iOS] Play/pause button's icon does not update when pausing in full screen

Modified: branches/safari-612-branch/Source/bmalloc/ChangeLog (283021 => 283022)


--- branches/safari-612-branch/Source/bmalloc/ChangeLog	2021-09-24 02:57:50 UTC (rev 283021)
+++ branches/safari-612-branch/Source/bmalloc/ChangeLog	2021-09-24 02:57:54 UTC (rev 283022)
@@ -120,6 +120,128 @@
             (Gigacage::ensureGigacage):
             * bmalloc/GigacageConfig.h:
 
+2021-09-23  Russell Epstein  <[email protected]>
+
+        Cherry-pick r281910. rdar://problem/83429926
+
+    Add more support for JIT operation validation testing.
+    https://bugs.webkit.org/show_bug.cgi?id=229534
+    rdar://81526335
+    
+    Reviewed by Saam Barati.
+    
+    Source/bmalloc:
+    
+    * bmalloc/Gigacage.cpp:
+    (Gigacage::ensureGigacage):
+    * bmalloc/GigacageConfig.h:
+    
+    Source/_javascript_Core:
+    
+    1. Added a JITOperationValidation.h to tidy up the code for supporting JIT
+       operation validation.
+    
+    2. Introduce a JITOperationAnnotation struct to record JIT operation function
+       pointers, with an extra pointer field for a validation test function.
+    
+    3. Changed JSC_ANNOTATE_JIT_OPERATION to capture a JITOperationAnnotation struct
+       instead of just a single operation pointer.
+    
+    4. Converted the static addPointers() function in JITOperationList.cpp into a
+       member function of JITOperationList.  This allows for the code to be more
+       terse, as well as enables the use of an inverse map mechanism on debug builds
+       only.
+    
+    5. Added more macros to help differentiate between different types of JIT
+       operation functions.
+    
+    6. Made all JIT operation functions use extern "C" linkage to make it possible to
+       write validation tests in assembly so that we can run them on a release build
+       as well without taking too much time.
+    
+    * CMakeLists.txt:
+    * _javascript_Core.xcodeproj/project.pbxproj:
+    * assembler/JITOperationList.cpp:
+    (JSC::JITOperationList::addInverseMap):
+    (JSC::JITOperationList::addPointers):
+    (JSC::JITOperationList::populatePointersInJavaScriptCore):
+    (JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):
+    (JSC::JITOperationList::populatePointersInEmbedder):
+    (JSC::addPointers): Deleted.
+    * assembler/JITOperationList.h:
+    (JSC::JITOperationList::map const):
+    (JSC::JITOperationList::inverseMap const):
+    (JSC::JITOperationList::assertIsJITOperation):
+    (JSC::JITOperationList::assertIsJITOperationWithvalidation):
+    * assembler/JITOperationValidation.h: Added.
+    * assembler/MacroAssemblerARM64.cpp:
+    * assembler/MacroAssemblerARM64.h:
+    * assembler/MacroAssemblerARM64E.h:
+    * assembler/MacroAssemblerARMv7.cpp:
+    * assembler/MacroAssemblerMIPS.cpp:
+    * assembler/MacroAssemblerX86Common.cpp:
+    * b3/testb3.h:
+    * b3/testb3_1.cpp:
+    * b3/testb3_5.cpp:
+    * b3/testb3_7.cpp:
+    * dfg/DFGOSRExit.h:
+    * ftl/FTLLowerDFGToB3.cpp:
+    * jit/ExecutableAllocator.cpp:
+    (JSC::initializeJITPageReservation):
+    * jit/Repatch.cpp:
+    (JSC::retagOperationWithValidation):
+    (JSC::retagCallTargetWithValidation):
+    (JSC::readPutICCallTarget):
+    * jit/ThunkGenerators.cpp:
+    * jsc.cpp:
+    * llint/LLIntData.cpp:
+    * llint/LLIntThunks.cpp:
+    * runtime/CommonSlowPaths.h:
+    * runtime/JSCPtrTag.h:
+    (JSC::tagJSCCodePtrImpl):
+    (JSC::untagJSCCodePtrImpl):
+    (JSC::isTaggedJSCCodePtrImpl):
+    * runtime/MathCommon.h:
+    * runtime/Options.cpp:
+    (JSC::canUseJITCage):
+    * tools/JSDollarVM.cpp:
+    * yarr/YarrJIT.cpp:
+    
+    Source/WebCore:
+    
+    * bindings/js/WebCoreJITOperations.cpp:
+    * bindings/scripts/CodeGeneratorJS.pm:
+    (GenerateImplementation):
+    * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+    (WebCore::JSTestDOMJITDOMConstructor::prototypeForStructure):
+    * cssjit/SelectorCompiler.cpp:
+    * testing/js/WebCoreTestSupport.cpp:
+    
+    Source/WTF:
+    
+    * wtf/PlatformCallingConventions.h:
+    * wtf/PtrTag.h:
+    (WTF::PtrTagTraits::isTagged):
+    (WTF::isTaggedNativeCodePtrImpl):
+    (WTF::isTaggedWith):
+    (WTF::assertIsTaggedWith):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-02  Mark Lam  <[email protected]>
+
+            Add more support for JIT operation validation testing.
+            https://bugs.webkit.org/show_bug.cgi?id=229534
+            rdar://81526335
+
+            Reviewed by Saam Barati.
+
+            * bmalloc/Gigacage.cpp:
+            (Gigacage::ensureGigacage):
+            * bmalloc/GigacageConfig.h:
+
 2021-09-23  Alan Coon  <[email protected]>
 
         Cherry-pick r282899. rdar://problem/83457612
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to