From a73d1c176f2f3e0458861de8590dc20321a501ae Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 23 Aug 2012 17:03:15 +0200 Subject: Imported WebKit commit a5ae8a56a48e44ebfb9b81aaa5488affaffdb175 (http://svn.webkit.org/repository/webkit/trunk@126420) New snapshot with OS X 10.6 build fix --- Source/JavaScriptCore/dfg/DFGGraph.h | 55 +++++++++--------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGGraph.h') diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h index 8d164a299..ba5d86f81 100644 --- a/Source/JavaScriptCore/dfg/DFGGraph.h +++ b/Source/JavaScriptCore/dfg/DFGGraph.h @@ -488,48 +488,20 @@ public: bool byValIsPure(Node& node) { - switch (node.op()) { - case PutByVal: { - if (!at(varArgChild(node, 1)).shouldSpeculateInteger()) - return false; - SpeculatedType prediction = at(varArgChild(node, 0)).prediction(); - if (!isActionableMutableArraySpeculation(prediction)) - return false; - return true; - } - - case PutByValSafe: { - if (!at(varArgChild(node, 1)).shouldSpeculateInteger()) - return false; - SpeculatedType prediction = at(varArgChild(node, 0)).prediction(); - if (!isActionableMutableArraySpeculation(prediction)) - return false; - if (isArraySpeculation(prediction)) - return false; - return true; - } - - case PutByValAlias: { - if (!at(varArgChild(node, 1)).shouldSpeculateInteger()) - return false; - SpeculatedType prediction = at(varArgChild(node, 0)).prediction(); - if (!isActionableMutableArraySpeculation(prediction)) - return false; - return true; - } - - case GetByVal: { - if (!at(node.child2()).shouldSpeculateInteger()) - return false; - SpeculatedType prediction = at(node.child1()).prediction(); - if (!isActionableArraySpeculation(prediction)) - return false; - return true; - } - - default: - ASSERT_NOT_REACHED(); + switch (node.arrayMode()) { + case Array::Generic: + case Array::JSArrayOutOfBounds: return false; + case Array::String: + return node.op() == GetByVal; +#if USE(JSVALUE32_64) + case Array::Arguments: + if (node.op() == GetByVal) + return true; + return false; +#endif // USE(JSVALUE32_64) + default: + return true; } } @@ -549,7 +521,6 @@ public: return !isPredictedNumerical(node); case GetByVal: case PutByVal: - case PutByValSafe: case PutByValAlias: return !byValIsPure(node); default: -- cgit v1.2.1