Title: [151468] branches/dfgFourthTier/Source/_javascript_Core
Revision
151468
Author
mhahnenb...@apple.com
Date
2013-06-11 13:53:31 -0700 (Tue, 11 Jun 2013)

Log Message

isContravenedByStructure is backwards
https://bugs.webkit.org/show_bug.cgi?id=117366

We should be checking if arrayModeForStructure(structure) is a 
subset of arrayModesThatPassFiltering(), not the other way around.
Also renamed isContravenedByStructure to better reflect what the 
function is trying to determine.

Rubber stamped by Filip Pizlo.

* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::structureWouldPassArrayModeFiltering):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheckAccountingForArrayMode):
(JSC::DFG::ArrayTypeCheck::isContravenedByValue):

Modified Paths

Diff

Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (151467 => 151468)


--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-06-11 20:43:38 UTC (rev 151467)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-06-11 20:53:31 UTC (rev 151468)
@@ -1,3 +1,21 @@
+2013-06-10  Mark Hahnenberg  <mhahnenb...@apple.com>
+
+        isContravenedByStructure is backwards
+        https://bugs.webkit.org/show_bug.cgi?id=117366
+
+        We should be checking if arrayModeForStructure(structure) is a 
+        subset of arrayModesThatPassFiltering(), not the other way around.
+        Also renamed isContravenedByStructure to better reflect what the 
+        function is trying to determine.
+
+        Rubber stamped by Filip Pizlo.
+
+        * dfg/DFGArrayMode.h:
+        (JSC::DFG::ArrayMode::structureWouldPassArrayModeFiltering):
+        * dfg/DFGTypeCheckHoistingPhase.cpp:
+        (JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheckAccountingForArrayMode):
+        (JSC::DFG::ArrayTypeCheck::isContravenedByValue):
+
 2013-06-11  Mark Lam  <mark....@apple.com>
 
         Removed unused local variable to fix cab build.

Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGArrayMode.h (151467 => 151468)


--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGArrayMode.h	2013-06-11 20:43:38 UTC (rev 151467)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGArrayMode.h	2013-06-11 20:53:31 UTC (rev 151468)
@@ -363,9 +363,9 @@
         return conversion() != Array::AsIs;
     }
 
-    bool isContravenedByStructure(Structure* structure)
+    bool structureWouldPassArrayModeFiltering(Structure* structure)
     {
-        return !arrayModesAlreadyChecked(arrayModesThatPassFiltering(), arrayModeFromStructure(structure));
+        return arrayModesAlreadyChecked(arrayModeFromStructure(structure), arrayModesThatPassFiltering());
     }
     
     ArrayModes arrayModesThatPassFiltering() const

Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp (151467 => 151468)


--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp	2013-06-11 20:43:38 UTC (rev 151467)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp	2013-06-11 20:53:31 UTC (rev 151468)
@@ -545,7 +545,7 @@
             return;
         if (!result->value.m_arrayModeHoistingOkay || !result->value.m_arrayModeIsValid)
             return;
-        if (!result->value.m_arrayMode.isContravenedByStructure(structure))
+        if (result->value.m_arrayMode.structureWouldPassArrayModeFiltering(structure))
             return;
         result->value.disableCheckArrayHoisting();
     }
@@ -579,7 +579,7 @@
     static bool isContravenedByValue(CheckData& checkData, JSValue value)
     {
         ASSERT(value.isCell());
-        return checkData.m_arrayMode.isContravenedByStructure(value.asCell()->structure());
+        return !checkData.m_arrayMode.structureWouldPassArrayModeFiltering(value.asCell()->structure());
     }
 
     static bool hasEnoughVotesToHoist(VariableAccessData* variable)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to