Title: [152480] branches/dfgFourthTier/Source/_javascript_Core
Revision
152480
Author
[email protected]
Date
2013-07-08 20:22:26 -0700 (Mon, 08 Jul 2013)

Log Message

fourthTier: DFG::AbstractState::beginBasicBlock() should set m_haveStructures if any of the valuesAtHead have either a current known structure or a non-top/non-bottom array modes
https://bugs.webkit.org/show_bug.cgi?id=118489

Reviewed by Mark Hahnenberg.

* bytecode/ArrayProfile.h:
(JSC::arrayModesAreClearOrTop):
(JSC):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::beginBasicBlock):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::hasClobberableState):
(AbstractValue):

Modified Paths

Diff

Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (152479 => 152480)


--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-07-09 03:09:02 UTC (rev 152479)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-07-09 03:22:26 UTC (rev 152480)
@@ -1,3 +1,19 @@
+2013-07-08  Filip Pizlo  <[email protected]>
+
+        fourthTier: DFG::AbstractState::beginBasicBlock() should set m_haveStructures if any of the valuesAtHead have either a current known structure or a non-top/non-bottom array modes
+        https://bugs.webkit.org/show_bug.cgi?id=118489
+
+        Reviewed by Mark Hahnenberg.
+
+        * bytecode/ArrayProfile.h:
+        (JSC::arrayModesAreClearOrTop):
+        (JSC):
+        * dfg/DFGAbstractState.cpp:
+        (JSC::DFG::AbstractState::beginBasicBlock):
+        * dfg/DFGAbstractValue.h:
+        (JSC::DFG::AbstractValue::hasClobberableState):
+        (AbstractValue):
+
 2013-07-08  Mark Hahnenberg  <[email protected]>
 
         CheckArray should call the right version of filterArrayModes

Modified: branches/dfgFourthTier/Source/_javascript_Core/bytecode/ArrayProfile.h (152479 => 152480)


--- branches/dfgFourthTier/Source/_javascript_Core/bytecode/ArrayProfile.h	2013-07-09 03:09:02 UTC (rev 152479)
+++ branches/dfgFourthTier/Source/_javascript_Core/bytecode/ArrayProfile.h	2013-07-09 03:22:26 UTC (rev 152480)
@@ -80,6 +80,11 @@
     return true;
 }
 
+inline bool arrayModesAreClearOrTop(ArrayModes modes)
+{
+    return !modes || modes == ALL_ARRAY_MODES;
+}
+
 // Checks if proven is a subset of expected.
 inline bool arrayModesAlreadyChecked(ArrayModes proven, ArrayModes expected)
 {

Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractState.cpp (152479 => 152480)


--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractState.cpp	2013-07-09 03:09:02 UTC (rev 152479)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractState.cpp	2013-07-09 03:22:26 UTC (rev 152480)
@@ -62,13 +62,13 @@
     m_variables = basicBlock->valuesAtHead;
     m_haveStructures = false;
     for (size_t i = 0; i < m_variables.numberOfArguments(); ++i) {
-        if (m_variables.argument(i).m_currentKnownStructure.isNeitherClearNorTop()) {
+        if (m_variables.argument(i).hasClobberableState()) {
             m_haveStructures = true;
             break;
         }
     }
     for (size_t i = 0; i < m_variables.numberOfLocals(); ++i) {
-        if (m_variables.local(i).m_currentKnownStructure.isNeitherClearNorTop()) {
+        if (m_variables.local(i).hasClobberableState()) {
             m_haveStructures = true;
             break;
         }

Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractValue.h (152479 => 152480)


--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractValue.h	2013-07-09 03:09:02 UTC (rev 152479)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGAbstractValue.h	2013-07-09 03:22:26 UTC (rev 152480)
@@ -243,6 +243,12 @@
         return 0;
     }
     
+    bool hasClobberableState() const
+    {
+        return m_currentKnownStructure.isNeitherClearNorTop()
+            || !arrayModesAreClearOrTop(m_arrayModes);
+    }
+    
     void checkConsistency() const;
     
     void dump(PrintStream&) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to