diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/dfg/DFGPhase.h | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGPhase.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGPhase.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGPhase.h b/Source/JavaScriptCore/dfg/DFGPhase.h index 6de043bbd..e92049c43 100644 --- a/Source/JavaScriptCore/dfg/DFGPhase.h +++ b/Source/JavaScriptCore/dfg/DFGPhase.h @@ -26,8 +26,6 @@ #ifndef DFGPhase_h #define DFGPhase_h -#include <wtf/Platform.h> - #if ENABLE(DFG_JIT) #include "DFGCommon.h" @@ -51,6 +49,8 @@ public: const char* name() const { return m_name; } + Graph& graph() { return m_graph; } + // Each phase must have a run() method. protected: @@ -60,6 +60,9 @@ protected: VM& vm() { return m_graph.m_vm; } CodeBlock* codeBlock() { return m_graph.m_codeBlock; } CodeBlock* profiledBlock() { return m_graph.m_profiledBlock; } + + // This runs validation, and uses the graph dump before the phase if possible. + void validate(); const char* m_name; @@ -67,13 +70,15 @@ private: // Call these hooks when starting and finishing. void beginPhase(); void endPhase(); + + CString m_graphDumpBeforePhase; }; template<typename PhaseType> bool runAndLog(PhaseType& phase) { bool result = phase.run(); - if (result && logCompilationChanges()) + if (result && logCompilationChanges(phase.graph().m_plan.mode)) dataLogF("Phase %s changed the IR.\n", phase.name()); return result; } |