summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGGraph.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-25 13:35:59 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-25 13:35:59 +0200
commit79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 (patch)
tree0287b1a69d84492c901e8bc820e635e7133809a0 /Source/JavaScriptCore/dfg/DFGGraph.h
parent682ab87480e7757346802ce7f54cfdbdfeb2339e (diff)
downloadqtwebkit-79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4.tar.gz
Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147)
New snapshot that includes Win32 debug build fix (use SVGAllInOne)
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);