X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/a253471d7f8e4d91bf6ebabab00155c3b387d3d0..93a3786624b2768d89bfa27e46598dc64e2fb70a:/dfg/DFGPhase.cpp diff --git a/dfg/DFGPhase.cpp b/dfg/DFGPhase.cpp index bae12b1..32e039e 100644 --- a/dfg/DFGPhase.cpp +++ b/dfg/DFGPhase.cpp @@ -1,5 +1,5 @@ /* - * 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 @@ -28,20 +28,25 @@ #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