]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGPhase.cpp
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / dfg / DFGPhase.cpp
index 15c413a569a00993308ea15bc59f708742333372..c13c8c449140e070b6898273db739f6824b23732 100644 (file)
@@ -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