diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/dfg/DFGGraph.cpp | |
parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGGraph.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGGraph.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.cpp b/Source/JavaScriptCore/dfg/DFGGraph.cpp index 8e80ff2fc..f4d260b9e 100644 --- a/Source/JavaScriptCore/dfg/DFGGraph.cpp +++ b/Source/JavaScriptCore/dfg/DFGGraph.cpp @@ -40,6 +40,18 @@ static const char* dfgOpNames[] = { #undef STRINGIZE_DFG_OP_ENUM }; +Graph::Graph(JSGlobalData& globalData, CodeBlock* codeBlock, unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues) + : m_globalData(globalData) + , m_codeBlock(codeBlock) + , m_profiledBlock(codeBlock->alternative()) + , m_hasArguments(false) + , m_osrEntryBytecodeIndex(osrEntryBytecodeIndex) + , m_mustHandleValues(mustHandleValues) + , m_fixpointState(BeforeFixpoint) +{ + ASSERT(m_profiledBlock); +} + const char *Graph::opName(NodeType op) { return dfgOpNames[op]; @@ -179,6 +191,8 @@ void Graph::dump(const char* prefix, NodeIndex nodeIndex) dataLog(", "); else hasPrinted = true; + if (!m_varArgChildren[childIdx]) + continue; dataLog("%s@%u%s", useKindToString(m_varArgChildren[childIdx].useKind()), m_varArgChildren[childIdx].index(), @@ -227,7 +241,7 @@ void Graph::dump(const char* prefix, NodeIndex nodeIndex) hasPrinted = true; } if (node.hasIdentifier()) { - dataLog("%sid%u{%s}", hasPrinted ? ", " : "", node.identifierNumber(), m_codeBlock->identifier(node.identifierNumber()).ustring().utf8().data()); + dataLog("%sid%u{%s}", hasPrinted ? ", " : "", node.identifierNumber(), m_codeBlock->identifier(node.identifierNumber()).string().utf8().data()); hasPrinted = true; } if (node.hasStructureSet()) { @@ -246,7 +260,7 @@ void Graph::dump(const char* prefix, NodeIndex nodeIndex) } if (node.hasStorageAccessData()) { StorageAccessData& storageAccessData = m_storageAccessData[node.storageAccessDataIndex()]; - dataLog("%sid%u{%s}", hasPrinted ? ", " : "", storageAccessData.identifierNumber, m_codeBlock->identifier(storageAccessData.identifierNumber).ustring().utf8().data()); + dataLog("%sid%u{%s}", hasPrinted ? ", " : "", storageAccessData.identifierNumber, m_codeBlock->identifier(storageAccessData.identifierNumber).string().utf8().data()); dataLog(", %lu", static_cast<unsigned long>(storageAccessData.offset)); hasPrinted = true; @@ -392,8 +406,10 @@ void Graph::dump() if (_node.flags() & NodeHasVarArgs) { \ for (unsigned _childIdx = _node.firstChild(); \ _childIdx < _node.firstChild() + _node.numChildren(); \ - _childIdx++) \ - thingToDo(m_varArgChildren[_childIdx]); \ + _childIdx++) { \ + if (!!m_varArgChildren[_childIdx]) \ + thingToDo(m_varArgChildren[_childIdx]); \ + } \ } else { \ if (!_node.child1()) { \ ASSERT(!_node.child2() \ @@ -483,6 +499,8 @@ void Graph::collectGarbage() for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); ++childIdx) { + if (!m_varArgChildren[childIdx]) + continue; NodeIndex childNodeIndex = m_varArgChildren[childIdx].index(); if (!at(childNodeIndex).ref()) continue; |