X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/dfg/DFGPhase.cpp diff --git a/dfg/DFGPhase.cpp b/dfg/DFGPhase.cpp index 15c413a..c13c8c4 100644 --- a/dfg/DFGPhase.cpp +++ b/dfg/DFGPhase.cpp @@ -35,8 +35,15 @@ namespace JSC { namespace DFG { void Phase::beginPhase() { + if (Options::verboseValidationFailure()) { + StringPrintStream out; + m_graph.dump(out); + m_graphDumpBeforePhase = out.toCString(); + } + if (!shouldDumpGraphAtEachPhase()) return; + dataLog("Beginning DFG phase ", m_name, ".\n"); dataLog("Before ", m_name, ":\n"); m_graph.dump(); @@ -46,7 +53,7 @@ void Phase::endPhase() { if (!Options::validateGraphAtEachPhase()) return; - validate(m_graph, DumpGraph); + validate(m_graph, DumpGraph, m_graphDumpBeforePhase); } } } // namespace JSC::DFG