summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGGraph.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-18 13:59:13 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-18 13:59:28 +0200
commit4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch)
treefd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/JavaScriptCore/dfg/DFGGraph.h
parentae901828d4689ab9e89113f6b6ea8042b37a9fda (diff)
downloadqtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGGraph.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.h39
1 files changed, 30 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h
index a9080d117..4091c48f7 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.h
+++ b/Source/JavaScriptCore/dfg/DFGGraph.h
@@ -463,26 +463,35 @@ public:
bool byValIsPure(Node& node)
{
- if (!at(node.child2()).shouldSpeculateInteger())
- return false;
- SpeculatedType prediction = at(node.child1()).prediction();
switch (node.op()) {
- case PutByVal:
+ case PutByVal: {
+ 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:
+ 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:
+ 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();
@@ -524,17 +533,29 @@ public:
void resetExitStates();
+ unsigned varArgNumChildren(Node& node)
+ {
+ ASSERT(node.flags() & NodeHasVarArgs);
+ return node.numChildren();
+ }
+
unsigned numChildren(Node& node)
{
if (node.flags() & NodeHasVarArgs)
- return node.numChildren();
+ return varArgNumChildren(node);
return AdjacencyList::Size;
}
- Edge child(Node& node, unsigned index)
+ Edge& varArgChild(Node& node, unsigned index)
+ {
+ ASSERT(node.flags() & NodeHasVarArgs);
+ return m_varArgChildren[node.firstChild() + index];
+ }
+
+ Edge& child(Node& node, unsigned index)
{
if (node.flags() & NodeHasVarArgs)
- return m_varArgChildren[node.firstChild() + index];
+ return varArgChild(node, index);
return node.children.child(index);
}