/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#if ENABLE(DFG_JIT)
+#include "DFGValidate.h"
+
namespace JSC { namespace DFG {
-#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
void Phase::beginPhase()
{
- dataLog("Beginning DFG phase %s.\n", m_name);
- dataLog("Graph before %s:\n", m_name);
+ if (!shouldDumpGraphAtEachPhase())
+ return;
+ dataLog("Beginning DFG phase ", m_name, ".\n");
+ dataLog("Before ", m_name, ":\n");
m_graph.dump();
}
void Phase::endPhase()
{
+ if (!Options::validateGraphAtEachPhase())
+ return;
+ validate(m_graph, DumpGraph);
}
-#endif
} } // namespace JSC::DFG