Title: [258952] trunk/Source/_javascript_Core
Revision
258952
Author
[email protected]
Date
2020-03-24 15:53:03 -0700 (Tue, 24 Mar 2020)

Log Message

Fix isEmpty AssemblyHelpers function and add isNotEmpty
https://bugs.webkit.org/show_bug.cgi?id=209507

Reviewed by Saam Barati.

This fixes the 32 version of my HasIndexedProperty patch as well
as properly names the functions for what they do.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::isEmpty):
(JSC::AssemblyHelpers::isNotEmpty):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (258951 => 258952)


--- trunk/Source/_javascript_Core/ChangeLog	2020-03-24 22:52:04 UTC (rev 258951)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-03-24 22:53:03 UTC (rev 258952)
@@ -1,3 +1,19 @@
+2020-03-24  Keith Miller  <[email protected]>
+
+        Fix isEmpty AssemblyHelpers function and add isNotEmpty
+        https://bugs.webkit.org/show_bug.cgi?id=209507
+
+        Reviewed by Saam Barati.
+
+        This fixes the 32 version of my HasIndexedProperty patch as well
+        as properly names the functions for what they do.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
+        * jit/AssemblyHelpers.h:
+        (JSC::AssemblyHelpers::isEmpty):
+        (JSC::AssemblyHelpers::isNotEmpty):
+
 2020-03-23  Keith Miller  <[email protected]>
 
         HasIndexedProperty should know about sane chain

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (258951 => 258952)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2020-03-24 22:52:04 UTC (rev 258951)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2020-03-24 22:53:03 UTC (rev 258952)
@@ -13593,7 +13593,7 @@
 #endif
 
         if (mode.isSaneChain()) {
-            m_jit.isEmpty(scratchGPR, resultGPR);
+            m_jit.isNotEmpty(scratchGPR, resultGPR);
             break;
         }
 
@@ -13655,7 +13655,7 @@
 #endif
 
         if (mode.isSaneChain()) {
-            m_jit.isEmpty(scratchGPR, resultGPR);
+            m_jit.isNotEmpty(scratchGPR, resultGPR);
             break;
         }
 

Modified: trunk/Source/_javascript_Core/jit/AssemblyHelpers.h (258951 => 258952)


--- trunk/Source/_javascript_Core/jit/AssemblyHelpers.h	2020-03-24 22:52:04 UTC (rev 258951)
+++ trunk/Source/_javascript_Core/jit/AssemblyHelpers.h	2020-03-24 22:53:03 UTC (rev 258952)
@@ -964,12 +964,21 @@
     void isEmpty(GPRReg gpr, GPRReg dst)
     {
 #if USE(JSVALUE64)
-        test64(NonZero, gpr, TrustedImm32(-1), dst);
+        test64(Zero, gpr, gpr, dst);
 #else
         compare32(Equal, gpr, TrustedImm32(JSValue::EmptyValueTag), dst);
 #endif
     }
 
+    void isNotEmpty(GPRReg gpr, GPRReg dst)
+    {
+#if USE(JSVALUE64)
+        test64(NonZero, gpr, gpr, dst);
+#else
+        compare32(NotEqual, gpr, TrustedImm32(JSValue::EmptyValueTag), dst);
+#endif
+    }
+
     Jump branchIfEmpty(GPRReg gpr)
     {
 #if USE(JSVALUE64)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to