// The other object is of a derived class, so clear the flags as they
// might no longer apply (especially hash_calculated). Oh, and don't
// copy the tinfo_key: it is already set correctly for this object.
- flags = 0;
+ fl &= ~(status_flags::evaluated | status_flags::expanded | status_flags::hash_calculated);
} else {
// The objects are of the exact same class, so copy the hash value.
hashvalue = other.hashvalue;
const print_context_class_info * pc_info = &c.get_class_info();
next_class:
-std::clog << "searching class " << reg_info->options.get_name() << std::endl;
const std::vector<print_functor> & pdt = reg_info->options.get_print_dispatch_table();
next_context:
-std::clog << "searching context " << pc_info->options.get_name() << ", ID " << pc_info->options.get_id() << std::endl;
unsigned id = pc_info->options.get_id();
if (id >= pdt.size() || !(pdt[id].is_valid())) {
} else {
// Call method
-std::clog << "method found, calling" << std::endl;
-std::clog << " this = " << class_name() << ", context = " << c.class_name() << std::endl;
pdt[id](*this, c, level);
}
}
void basic::do_print_tree(const print_tree & c, unsigned level) const
{
c.s << std::string(level, ' ') << class_name()
- << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec
- << ", nops=" << nops()
- << std::endl;
+ << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec;
+ if (nops())
+ c.s << ", nops=" << nops();
+ c.s << std::endl;
for (size_t i=0; i<nops(); ++i)
op(i).print(c, level + c.delta_indent);
}