Title: [241890] branches/safari-607-branch/Source/_javascript_Core
Revision
241890
Author
[email protected]
Date
2019-02-21 13:27:25 -0800 (Thu, 21 Feb 2019)

Log Message

Cherry-pick r241753. rdar://problem/48243425

    Fix DFG doesGC() for CompareEq/Less/LessEq/Greater/GreaterEq and CompareStrictEq nodes.
    https://bugs.webkit.org/show_bug.cgi?id=194800
    <rdar://problem/48183773>

    Reviewed by Yusuke Suzuki.

    Fix doesGC() for the following nodes:

        CompareEq:
        CompareLess:
        CompareLessEq:
        CompareGreater:
        CompareGreaterEq:
        CompareStrictEq:
            Only return false (i.e. does not GC) for child node use kinds that have
            been vetted to not do anything that can GC.  For all other use kinds
            (including StringUse and BigIntUse), we return true (i.e. does GC).

    * dfg/DFGDoesGC.cpp:
    (JSC::DFG::doesGC):

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

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/_javascript_Core/ChangeLog (241889 => 241890)


--- branches/safari-607-branch/Source/_javascript_Core/ChangeLog	2019-02-21 21:27:22 UTC (rev 241889)
+++ branches/safari-607-branch/Source/_javascript_Core/ChangeLog	2019-02-21 21:27:25 UTC (rev 241890)
@@ -1,5 +1,56 @@
 2019-02-20  Alan Coon  <[email protected]>
 
+        Cherry-pick r241753. rdar://problem/48243425
+
+    Fix DFG doesGC() for CompareEq/Less/LessEq/Greater/GreaterEq and CompareStrictEq nodes.
+    https://bugs.webkit.org/show_bug.cgi?id=194800
+    <rdar://problem/48183773>
+    
+    Reviewed by Yusuke Suzuki.
+    
+    Fix doesGC() for the following nodes:
+    
+        CompareEq:
+        CompareLess:
+        CompareLessEq:
+        CompareGreater:
+        CompareGreaterEq:
+        CompareStrictEq:
+            Only return false (i.e. does not GC) for child node use kinds that have
+            been vetted to not do anything that can GC.  For all other use kinds
+            (including StringUse and BigIntUse), we return true (i.e. does GC).
+    
+    * dfg/DFGDoesGC.cpp:
+    (JSC::DFG::doesGC):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-02-18  Mark Lam  <[email protected]>
+
+            Fix DFG doesGC() for CompareEq/Less/LessEq/Greater/GreaterEq and CompareStrictEq nodes.
+            https://bugs.webkit.org/show_bug.cgi?id=194800
+            <rdar://problem/48183773>
+
+            Reviewed by Yusuke Suzuki.
+
+            Fix doesGC() for the following nodes:
+
+                CompareEq:
+                CompareLess:
+                CompareLessEq:
+                CompareGreater:
+                CompareGreaterEq:
+                CompareStrictEq:
+                    Only return false (i.e. does not GC) for child node use kinds that have
+                    been vetted to not do anything that can GC.  For all other use kinds
+                    (including StringUse and BigIntUse), we return true (i.e. does GC).
+
+            * dfg/DFGDoesGC.cpp:
+            (JSC::DFG::doesGC):
+
+2019-02-20  Alan Coon  <[email protected]>
+
         Cherry-pick r241634. rdar://problem/48243442
 
     RELEASE_ASSERT at com.apple._javascript_Core: JSC::jsSubstringOfResolved

Modified: branches/safari-607-branch/Source/_javascript_Core/dfg/DFGDoesGC.cpp (241889 => 241890)


--- branches/safari-607-branch/Source/_javascript_Core/dfg/DFGDoesGC.cpp	2019-02-21 21:27:22 UTC (rev 241889)
+++ branches/safari-607-branch/Source/_javascript_Core/dfg/DFGDoesGC.cpp	2019-02-21 21:27:25 UTC (rev 241890)
@@ -140,14 +140,8 @@
     case CheckNotEmpty:
     case AssertNotEmpty:
     case CheckStringIdent:
-    case CompareLess:
-    case CompareLessEq:
-    case CompareGreater:
-    case CompareGreaterEq:
     case CompareBelow:
     case CompareBelowEq:
-    case CompareEq:
-    case CompareStrictEq:
     case CompareEqPtr:
     case ProfileType:
     case ProfileControlFlow:
@@ -407,6 +401,46 @@
         ASSERT(Options::usePollingTraps());
         return true;
 
+    case CompareEq:
+    case CompareLess:
+    case CompareLessEq:
+    case CompareGreater:
+    case CompareGreaterEq:
+        if (node->isBinaryUseKind(Int32Use)
+#if USE(JSVALUE64)
+            || node->isBinaryUseKind(Int52RepUse)
+#endif
+            || node->isBinaryUseKind(DoubleRepUse)
+            || node->isBinaryUseKind(StringIdentUse)
+            )
+            return false;
+        if (node->op() == CompareEq) {
+            if (node->isBinaryUseKind(BooleanUse)
+                || node->isBinaryUseKind(SymbolUse)
+                || node->isBinaryUseKind(ObjectUse)
+                || node->isBinaryUseKind(ObjectUse, ObjectOrOtherUse) || node->isBinaryUseKind(ObjectOrOtherUse, ObjectUse))
+                return false;
+        }
+        return true;
+
+    case CompareStrictEq:
+        if (node->isBinaryUseKind(BooleanUse)
+            || node->isBinaryUseKind(Int32Use)
+#if USE(JSVALUE64)
+            || node->isBinaryUseKind(Int52RepUse)
+#endif
+            || node->isBinaryUseKind(DoubleRepUse)
+            || node->isBinaryUseKind(SymbolUse)
+            || node->isBinaryUseKind(SymbolUse, UntypedUse)
+            || node->isBinaryUseKind(UntypedUse, SymbolUse)
+            || node->isBinaryUseKind(StringIdentUse)
+            || node->isBinaryUseKind(ObjectUse, UntypedUse) || node->isBinaryUseKind(UntypedUse, ObjectUse)
+            || node->isBinaryUseKind(ObjectUse)
+            || node->isBinaryUseKind(MiscUse, UntypedUse) || node->isBinaryUseKind(UntypedUse, MiscUse)
+            || node->isBinaryUseKind(StringIdentUse, NotStringVarUse) || node->isBinaryUseKind(NotStringVarUse, StringIdentUse))
+            return false;
+        return true;
+
     case GetIndexedPropertyStorage:
     case GetByVal:
         if (node->arrayMode().type() == Array::String)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to