Title: [291932] trunk/Source/_javascript_Core
Revision
291932
Author
[email protected]
Date
2022-03-25 21:30:10 -0700 (Fri, 25 Mar 2022)

Log Message

[JSC] Clean up DataIC polymorphic call code for OptimizingCallLinkInfo
https://bugs.webkit.org/show_bug.cgi?id=238395

Reviewed by Saam Barati.

When using DataIC, return address is already appropriate in non-tail call case
in polymorphic call stub code. This patch cleans up the code to align it to
DataIC BaselineCallLinkInfo.

* bytecode/Repatch.cpp:
(JSC::linkPolymorphicCall):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (291931 => 291932)


--- trunk/Source/_javascript_Core/ChangeLog	2022-03-26 03:29:23 UTC (rev 291931)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-03-26 04:30:10 UTC (rev 291932)
@@ -1,3 +1,17 @@
+2022-03-25  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Clean up DataIC polymorphic call code for OptimizingCallLinkInfo
+        https://bugs.webkit.org/show_bug.cgi?id=238395
+
+        Reviewed by Saam Barati.
+
+        When using DataIC, return address is already appropriate in non-tail call case
+        in polymorphic call stub code. This patch cleans up the code to align it to
+        DataIC BaselineCallLinkInfo.
+
+        * bytecode/Repatch.cpp:
+        (JSC::linkPolymorphicCall):
+
 2022-03-25  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r291745.

Modified: trunk/Source/_javascript_Core/bytecode/Repatch.cpp (291931 => 291932)


--- trunk/Source/_javascript_Core/bytecode/Repatch.cpp	2022-03-26 03:29:23 UTC (rev 291931)
+++ trunk/Source/_javascript_Core/bytecode/Repatch.cpp	2022-03-26 04:30:10 UTC (rev 291932)
@@ -1877,14 +1877,10 @@
         case CallLinkInfo::Type::Optimizing: {
             // While Baseline / LLInt shares BaselineCallLinkInfo, OptimizingCallLinkInfo is exclusively used for one JIT code.
             // Thus, we can safely use doneLocation.
-            if (!callLinkInfo.isTailCall()) {
-                // We were called from the fast path, get rid of any remnants of that
-                // which may exist. This really only matters for x86, which adjusts
-                // SP for calls.
-                stubJit.preserveReturnAddressAfterCall(GPRInfo::regT4);
+            if (callLinkInfo.isTailCall()) {
+                stubJit.move(CCallHelpers::TrustedImmPtr(callLinkInfo.doneLocation().untaggedExecutableAddress()), GPRInfo::regT4);
+                stubJit.restoreReturnAddressBeforeReturn(GPRInfo::regT4);
             }
-            stubJit.move(CCallHelpers::TrustedImmPtr(callLinkInfo.doneLocation().untaggedExecutableAddress()), GPRInfo::regT4);
-            stubJit.restoreReturnAddressBeforeReturn(GPRInfo::regT4);
             break;
         }
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to