summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-03 14:57:41 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-03 14:57:42 +0200
commit276fb8ee82394b8fe414196677ce6af4028c5652 (patch)
tree10fb46e05a825f367dce6204a90d93b83e7f8718 /Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
parent3436b01e6296fa23d6b7a2fad875af6116a9650b (diff)
parentfad1b063ed174a07392561c0323355115aa66992 (diff)
downloadqtwebkit-276fb8ee82394b8fe414196677ce6af4028c5652.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ibb1f73326070b66000c54c3c722a45cb7b4791c1
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp b/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
index 5b6c28ff7..4226fcc6a 100644
--- a/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
@@ -211,7 +211,13 @@ private:
case SetLocal: {
VariableAccessData* variableAccessData = node.variableAccessData();
changed |= variableAccessData->predict(m_graph[node.child1()].prediction());
- changed |= m_graph[node.child1()].mergeFlags(variableAccessData->flags());
+
+ // Assume conservatively that a SetLocal implies that the value may flow through a loop,
+ // and so we would have overflow leading to the program "observing" numbers even if all
+ // users of the value are doing toInt32. It might be worthwhile to revisit this at some
+ // point and actually check if the data flow involves loops, but right now I don't think
+ // we have evidence that this would be beneficial for benchmarks.
+ changed |= m_graph[node.child1()].mergeFlags(variableAccessData->flags() | NodeUsedAsNumber);
break;
}