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.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h
index acc9ff472..9e4a28fc3 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.h
+++ b/Source/JavaScriptCore/dfg/DFGGraph.h
@@ -179,11 +179,15 @@ public:
// CodeBlock is optional, but may allow additional information to be dumped (e.g. Identifier names).
void dump();
- void dump(NodeIndex);
+ enum PhiNodeDumpMode { DumpLivePhisOnly, DumpAllPhis };
+ void dumpBlockHeader(const char* prefix, BlockIndex, PhiNodeDumpMode);
+ void dump(const char* prefix, NodeIndex);
+ static int amountOfNodeWhiteSpace(Node&);
+ static void printNodeWhiteSpace(Node&);
// Dump the code origin of the given node as a diff from the code origin of the
// preceding node.
- void dumpCodeOrigin(NodeIndex, NodeIndex);
+ void dumpCodeOrigin(const char* prefix, NodeIndex, NodeIndex);
BlockIndex blockIndexForBytecodeOffset(Vector<BlockIndex>& blocks, unsigned bytecodeBegin);
@@ -273,6 +277,18 @@ public:
return false;
return true;
}
+ bool isInternalFunctionConstant(NodeIndex nodeIndex)
+ {
+ if (!isJSConstant(nodeIndex))
+ return false;
+ JSValue value = valueOfJSConstant(nodeIndex);
+ if (!value.isCell() || !value)
+ return false;
+ JSCell* cell = value.asCell();
+ if (!cell->inherits(&InternalFunction::s_info))
+ return false;
+ return true;
+ }
// Helper methods get constant values from nodes.
JSValue valueOfJSConstant(NodeIndex nodeIndex)
{
@@ -296,6 +312,10 @@ public:
ASSERT(function);
return jsCast<JSFunction*>(function);
}
+ InternalFunction* valueOfInternalFunctionConstant(NodeIndex nodeIndex)
+ {
+ return jsCast<InternalFunction*>(valueOfJSConstant(nodeIndex).asCell());
+ }
static const char *opName(NodeType);