summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
downloadqtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGCSEPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGCSEPhase.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp b/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
index cea2f3c48..185332921 100644
--- a/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
@@ -177,6 +177,7 @@ private:
if (!m_graph.byValIsPure(node))
return NoNode;
switch (node.arrayMode()) {
+ case CONTIGUOUS_TO_TAIL_MODES:
case ARRAY_STORAGE_TO_HOLE_MODES:
return NoNode;
default:
@@ -197,6 +198,8 @@ private:
for (unsigned i = m_indexInBlock; i--;) {
NodeIndex index = m_currentBlock->at(i);
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case GetGlobalVar:
if (node.registerPointer() == registerPointer)
@@ -220,6 +223,8 @@ private:
for (unsigned i = m_indexInBlock; i--;) {
NodeIndex index = m_currentBlock->at(i);
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case GetScopedVar: {
Node& getScopeRegisters = m_graph[node.child1()];
@@ -248,6 +253,8 @@ private:
for (unsigned i = m_indexInBlock; i--;) {
NodeIndex index = m_currentBlock->at(i);
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case GlobalVarWatchpoint:
if (node.registerPointer() == registerPointer)
@@ -334,6 +341,8 @@ private:
break;
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case GetByVal:
if (!m_graph.byValIsPure(node))
@@ -359,9 +368,6 @@ private:
// for a structure change or a put to property storage to affect
// the GetByVal.
break;
- case ArrayPush:
- // A push cannot affect previously existing elements in the array.
- break;
default:
if (m_graph.clobbersWorld(index))
return NoNode;
@@ -393,6 +399,8 @@ private:
break;
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case CheckStructure:
case ForwardCheckStructure:
@@ -447,6 +455,8 @@ private:
break;
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case CheckStructure:
case ForwardCheckStructure:
@@ -549,6 +559,8 @@ private:
break;
Node& node = m_graph[index];
+ if (!node.shouldGenerate())
+ continue;
switch (node.op()) {
case GetByOffset:
if (node.child1() == child1
@@ -1222,9 +1234,7 @@ private:
case PutByVal: {
Edge child1 = m_graph.varArgChild(node, 0);
Edge child2 = m_graph.varArgChild(node, 1);
- if (isActionableMutableArraySpeculation(m_graph[child1].prediction())
- && m_graph[child2].shouldSpeculateInteger()
- && !m_graph[child1].shouldSpeculateArguments()) {
+ if (canCSEStorage(node.arrayMode())) {
NodeIndex nodeIndex = getByValLoadElimination(child1.index(), child2.index());
if (nodeIndex == NoNode)
break;