Title: [294577] releases/WebKitGTK/webkit-2.36/Source/_javascript_Core
Revision
294577
Author
ape...@igalia.com
Date
2022-05-20 14:12:52 -0700 (Fri, 20 May 2022)

Log Message

Merge r292269 - AI should do int32 optimization in ValueRep
https://bugs.webkit.org/show_bug.cgi?id=238699

Reviewed by Saam Barati.

When constant folding an int52 into a ValueRep AI doesn't
do our normal int32 boxing optimization. I'm not sure if
it matters since I couldn't find a test but it probably
doesn't hurt.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/ChangeLog (294576 => 294577)


--- releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/ChangeLog	2022-05-20 21:12:35 UTC (rev 294576)
+++ releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/ChangeLog	2022-05-20 21:12:52 UTC (rev 294577)
@@ -1,3 +1,18 @@
+2022-04-02  Keith Miller  <keith_mil...@apple.com>
+
+        AI should do int32 optimization in ValueRep
+        https://bugs.webkit.org/show_bug.cgi?id=238699
+
+        Reviewed by Saam Barati.
+
+        When constant folding an int52 into a ValueRep AI doesn't
+        do our normal int32 boxing optimization. I'm not sure if
+        it matters since I couldn't find a test but it probably
+        doesn't hurt.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+
 2022-03-21  Saam Barati  <sbar...@apple.com>
 
         Fix bug in Relationship::mergeImpl

Modified: releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (294576 => 294577)


--- releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2022-05-20 21:12:35 UTC (rev 294576)
+++ releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2022-05-20 21:12:52 UTC (rev 294577)
@@ -750,6 +750,10 @@
     case ValueRep: {
         JSValue value = forNode(node->child1()).value();
         if (value) {
+            if (node->child1().useKind() == Int52RepUse) {
+                if (auto int32 = value.tryGetAsInt32())
+                    value = jsNumber(*int32);
+            }
             setConstant(node, value);
             break;
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to