Title: [291892] branches/safari-613.1.17.1-branch/Source/_javascript_Core
Revision
291892
Author
[email protected]
Date
2022-03-25 15:05:27 -0700 (Fri, 25 Mar 2022)

Log Message

Cherry-pick r291891. rdar://problem/90838071

    AI should not set the structure for ObjectCreate
    https://bugs.webkit.org/show_bug.cgi?id=238349

    Patch by Justin Michaud <[email protected]> on 2022-03-24
    Reviewed by Saam Barati and Yusuke Suzuki.

    The AbstractInterpreter should not set the structure for ObjectCreate because it might change by
    the time the constant folding phase runs if the structure cache is cleared.

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

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

Modified Paths

Diff

Modified: branches/safari-613.1.17.1-branch/Source/_javascript_Core/ChangeLog (291891 => 291892)


--- branches/safari-613.1.17.1-branch/Source/_javascript_Core/ChangeLog	2022-03-25 21:51:53 UTC (rev 291891)
+++ branches/safari-613.1.17.1-branch/Source/_javascript_Core/ChangeLog	2022-03-25 22:05:27 UTC (rev 291892)
@@ -1,3 +1,36 @@
+2022-03-25  Alan Coon  <[email protected]>
+
+        Cherry-pick r291891. rdar://problem/90838071
+
+    AI should not set the structure for ObjectCreate
+    https://bugs.webkit.org/show_bug.cgi?id=238349
+    
+    Patch by Justin Michaud <[email protected]> on 2022-03-24
+    Reviewed by Saam Barati and Yusuke Suzuki.
+    
+    The AbstractInterpreter should not set the structure for ObjectCreate because it might change by
+    the time the constant folding phase runs if the structure cache is cleared.
+    
+    * dfg/DFGAbstractInterpreterInlines.h:
+    (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-03-24  Justin Michaud  <[email protected]>
+
+            AI should not set the structure for ObjectCreate
+            https://bugs.webkit.org/show_bug.cgi?id=238349
+
+            Reviewed by Saam Barati and Yusuke Suzuki.
+
+            The AbstractInterpreter should not set the structure for ObjectCreate because it might change by
+            the time the constant folding phase runs if the structure cache is cleared.
+
+            * dfg/DFGAbstractInterpreterInlines.h:
+            (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+
 2022-02-16  Russell Epstein  <[email protected]>
 
         Revert r289919. rdar://problem/81337114

Modified: branches/safari-613.1.17.1-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (291891 => 291892)


--- branches/safari-613.1.17.1-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2022-03-25 21:51:53 UTC (rev 291891)
+++ branches/safari-613.1.17.1-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2022-03-25 22:05:27 UTC (rev 291892)
@@ -3123,25 +3123,10 @@
     }
 
     case ObjectCreate: {
-        if (JSValue base = forNode(node->child1()).m_value) {
-            JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
-            Structure* structure = nullptr;
-            if (base.isNull())
-                structure = globalObject->nullPrototypeObjectStructure();
-            else if (base.isObject()) {
-                // Having a bad time clears the structureCache, and so it should invalidate this structure.
-                bool isHavingABadTime = globalObject->isHavingABadTime();
-                // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we
-                // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load
-                // does not get hoisted above the check.
-                WTF::loadLoadFence();
-                if (!isHavingABadTime)
-                    m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
-                structure = m_vm.structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
-            }
-            
-            if (structure) {
-                m_state.setShouldTryConstantFolding(true);
+        if (JSValue prototype = forNode(node->child1()).m_value) {
+            m_state.setShouldTryConstantFolding(true);
+            if (prototype.isNull()) {
+                Structure* structure = m_graph.globalObjectFor(node->origin.semantic)->nullPrototypeObjectStructure();
                 if (node->child1().useKind() == UntypedUse)
                     didFoldClobberWorld();
                 setForNode(node, structure);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to