summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
commit6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch)
tree5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
parent6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff)
downloadqtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGFixupPhase.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index 2f92e5608..aa2d5dff4 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -90,7 +90,7 @@ private:
if (arrayProfile) {
arrayProfile->computeUpdatedPrediction();
arrayMode = refineArrayMode(
- fromObserved(arrayProfile->observedArrayModes(), false),
+ fromObserved(arrayProfile, Array::Read, false),
m_graph[node.child1()].prediction(),
m_graph[m_compileIndex].prediction());
if (modeSupportsLength(arrayMode) && arrayProfile->hasDefiniteStructure()) {
@@ -380,6 +380,23 @@ private:
ASSERT(modeIsSpecific(arrayMode));
m_graph.ref(array);
+
+ if (isEffectful(arrayMode)) {
+ Node arrayify(Arrayify, codeOrigin, OpInfo(arrayMode), array);
+ arrayify.ref(); // Once because it's used as a butterfly.
+ arrayify.ref(); // And twice because it's must-generate.
+ NodeIndex arrayifyIndex = m_graph.size();
+ m_graph.append(arrayify);
+ m_insertionSet.append(m_indexInBlock, arrayifyIndex);
+
+ ASSERT(storageCheck == canCSEStorage);
+ ASSERT(shouldGenerate);
+ ASSERT(canCSEStorage(arrayMode));
+ ASSERT(modeUsesButterfly(arrayMode));
+
+ return arrayifyIndex;
+ }
+
Node checkArray(CheckArray, codeOrigin, OpInfo(arrayMode), array);
checkArray.ref();
NodeIndex checkArrayIndex = m_graph.size();