//-------------------------------------------------------------------------------------------------------------------- void Phi::dump (ostream& os) { os << cfg->GetIRInterface().GetSymNameFromSymHandle(sym) << " = phi ("; ArgIterator arg_iter(*this); CFG::Node* n; LeafHandle l; if ((bool)arg_iter) { n = arg_iter; l = arg_iter; n->dump(os); os << ":"; cfg->GetIRInterface().PrintLeaf(l, os); ++arg_iter; while ((bool)arg_iter) { os << ", "; n = arg_iter; l = arg_iter; n->dump(os); os << ":"; cfg->GetIRInterface().PrintLeaf(l, os); ++arg_iter; } } os << ")"; }
Ref<String> Name::toString () const { // TODO abortIf (!validate ()); Ref<String> str = String::forPrintTask ( Pr << name_str << // Deprecated (global_namespace ? ":: " : "") << (is_destructor ? "~ " : "") << (is_operator ? "operator " : "") << (is_operator && !is_conversion_operator ? operator_type.toString () : String::nullString ()) << "" /* TODO */ // << // (is_conversion_operator ? // conversion_type->toString () : String::nullString ()) << "" /* TODO */ << // (is_template ? "template " : "")); ); if (is_template) { str = String::forPrintTask (Pr << str << " < "); List< Ref<TemplateArgument> >::DataIterator arg_iter (template_arguments); while (!arg_iter.done ()) { Ref<TemplateArgument> &template_argument = arg_iter.next (); switch (template_argument->getType ()) { case TemplateArgument::t_Type: { TemplateArgument_Type * const template_argument__type = static_cast <TemplateArgument_Type*> (template_argument.ptr ()); // TODO Dump type str = String::forPrintTask (Pr << str << "TYPE"); } break; case TemplateArgument::t_Expression: { TemplateArgument_Expression * const template_argument__expression = static_cast <TemplateArgument_Expression*> (template_argument.ptr ()); // TODO Dump expression str = String::forPrintTask (Pr << str << "EXPRESSION"); } break; default: abortIfReached (); } str = String::forPrintTask (Pr << str << (arg_iter.done () ? "" : ", ")); } str = String::forPrintTask (Pr << str << " > "); } return str; }