Title: [153220] trunk/Source/_javascript_Core
- Revision
- 153220
- Author
- [email protected]
- Date
- 2013-07-24 21:02:32 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: 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: trunk/Source/_javascript_Core/ChangeLog (153219 => 153220)
--- trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:02:30 UTC (rev 153219)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:02:32 UTC (rev 153220)
@@ -1,3 +1,21 @@
+2013-06-10 Mark Hahnenberg <[email protected]>
+
+ 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 Filip Pizlo <[email protected]>
fourthTier: Type check hoisting phase has a dead if statement
Modified: trunk/Source/_javascript_Core/dfg/DFGArrayMode.h (153219 => 153220)
--- trunk/Source/_javascript_Core/dfg/DFGArrayMode.h 2013-07-25 04:02:30 UTC (rev 153219)
+++ trunk/Source/_javascript_Core/dfg/DFGArrayMode.h 2013-07-25 04:02:32 UTC (rev 153220)
@@ -368,9 +368,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: trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp (153219 => 153220)
--- trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp 2013-07-25 04:02:30 UTC (rev 153219)
+++ trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp 2013-07-25 04:02:32 UTC (rev 153220)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes