summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGGraph.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h
index ba5d86f81..70cbbaf07 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.h
+++ b/Source/JavaScriptCore/dfg/DFGGraph.h
@@ -53,14 +53,6 @@ namespace DFG {
struct StorageAccessData {
size_t offset;
unsigned identifierNumber;
-
- // NOTE: the offset and identifierNumber do not by themselves
- // uniquely identify a property. The identifierNumber and a
- // Structure* do. If those two match, then the offset should
- // be the same, as well. For any Node that has a StorageAccessData,
- // it is possible to retrieve the Structure* by looking at the
- // first child. It should be a CheckStructure, which has the
- // Structure*.
};
struct ResolveGlobalData {
@@ -76,16 +68,7 @@ struct ResolveGlobalData {
// Nodes that are 'dead' remain in the vector with refCount 0.
class Graph : public Vector<Node, 64> {
public:
- 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)
- {
- ASSERT(m_profiledBlock);
- }
+ Graph(JSGlobalData&, CodeBlock*, unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues);
using Vector<Node, 64>::operator[];
using Vector<Node, 64>::at;
@@ -585,8 +568,10 @@ public:
if (node.flags() & NodeHasVarArgs) {
for (unsigned childIdx = node.firstChild();
childIdx < node.firstChild() + node.numChildren();
- childIdx++)
- vote(m_varArgChildren[childIdx], ballot);
+ childIdx++) {
+ if (!!m_varArgChildren[childIdx])
+ vote(m_varArgChildren[childIdx], ballot);
+ }
return;
}
@@ -608,8 +593,10 @@ public:
NodeIndex nodeIndex = block[indexInBlock];
Node& node = at(nodeIndex);
if (node.flags() & NodeHasVarArgs) {
- for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); ++childIdx)
- compareAndSwap(m_varArgChildren[childIdx], oldThing, newThing, node.shouldGenerate());
+ for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); ++childIdx) {
+ if (!!m_varArgChildren[childIdx])
+ compareAndSwap(m_varArgChildren[childIdx], oldThing, newThing, node.shouldGenerate());
+ }
continue;
}
if (!node.child1())
@@ -685,6 +672,8 @@ public:
unsigned m_parameterSlots;
unsigned m_osrEntryBytecodeIndex;
Operands<JSValue> m_mustHandleValues;
+
+ OptimizationFixpointState m_fixpointState;
private:
void handleSuccessor(Vector<BlockIndex, 16>& worklist, BlockIndex blockIndex, BlockIndex successorIndex);