src/share/vm/c1/c1_Canonicalizer.cpp

Print this page

        

*** 24,48 **** #include "incls/_precompiled.incl" #include "incls/_c1_Canonicalizer.cpp.incl" ! static void do_print_value(Value* vp) { (*vp)->print_line(); ! } void Canonicalizer::set_canonical(Value x) { assert(x != NULL, "value must exist"); // Note: we can not currently substitute root nodes which show up in // the instruction stream (because the instruction list is embedded // in the instructions). if (canonical() != x) { if (PrintCanonicalization) { ! canonical()->input_values_do(do_print_value); canonical()->print_line(); tty->print_cr("canonicalized to:"); ! x->input_values_do(do_print_value); x->print_line(); tty->cr(); } assert(_canonical->type()->tag() == x->type()->tag(), "types must match"); _canonical = x; --- 24,51 ---- #include "incls/_precompiled.incl" #include "incls/_c1_Canonicalizer.cpp.incl" ! class PrintValueVisitor: public ValueVisitor { ! void visit(Value* vp) { (*vp)->print_line(); ! } ! }; void Canonicalizer::set_canonical(Value x) { assert(x != NULL, "value must exist"); // Note: we can not currently substitute root nodes which show up in // the instruction stream (because the instruction list is embedded // in the instructions). if (canonical() != x) { if (PrintCanonicalization) { ! PrintValueVisitor do_print_value; ! canonical()->input_values_do(&do_print_value); canonical()->print_line(); tty->print_cr("canonicalized to:"); ! x->input_values_do(&do_print_value); x->print_line(); tty->cr(); } assert(_canonical->type()->tag() == x->type()->tag(), "types must match"); _canonical = x;