/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "libadt/vectset.hpp"
#include "utilities/growableArray.hpp"
#include "utilities/ostream.hpp"
#include "utilities/xmlstream.hpp"
#ifndef PRODUCT
class Compile;
class PhaseIFG;
class PhaseChaitin;
class Matcher;
class Node;
class InlineTree;
class ciMethod;
class IdealGraphPrinter
{
private:
static const char *INDENT;
static const char *TOP_ELEMENT;
static const char *GROUP_ELEMENT;
static const char *GRAPH_ELEMENT;
static const char *PROPERTIES_ELEMENT;
static const char *EDGES_ELEMENT;
static const char *PROPERTY_ELEMENT;
static const char *EDGE_ELEMENT;
static const char *NODE_ELEMENT;
static const char *NODES_ELEMENT;
static const char *CONTROL_FLOW_ELEMENT;
static const char *REMOVE_EDGE_ELEMENT;
static const char *REMOVE_NODE_ELEMENT;
static const char *METHOD_NAME_PROPERTY;
static const char *BLOCK_NAME_PROPERTY;
static const char *BLOCK_DOMINATOR_PROPERTY;
static const char *BLOCK_ELEMENT;
static const char *SUCCESSORS_ELEMENT;
static const char *SUCCESSOR_ELEMENT;
static const char *METHOD_IS_PUBLIC_PROPERTY;
static const char *METHOD_IS_STATIC_PROPERTY;
static const char *TRUE_VALUE;
static const char *NODE_NAME_PROPERTY;
static const char *EDGE_NAME_PROPERTY;
static const char *NODE_ID_PROPERTY;
static const char *FROM_PROPERTY;
static const char *TO_PROPERTY;
static const char *PROPERTY_NAME_PROPERTY;
static const char *GRAPH_NAME_PROPERTY;
static const char *INDEX_PROPERTY;
static const char *METHOD_ELEMENT;
static const char *INLINE_ELEMENT;
static const char *BYTECODES_ELEMENT;
static const char *METHOD_BCI_PROPERTY;
static const char *METHOD_SHORT_NAME_PROPERTY;
static const char *ASSEMBLY_ELEMENT;
static int _file_count;
int _depth;
bool _should_send_method;
bool _traverse_outs;
Compile *C;
void print_indent();
void begin_elem(const char *s);
void end_elem();
void begin_head(const char *s);
void end_head();
void text(const char *s);
public:
static void clean_up();
static IdealGraphPrinter *printer();
bool traverse_outs();
void set_traverse_outs(bool b);
outputStream *output();
void end_method();
};
#endif
#endif // SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP