xo-allod: + per-type stats + pretty printing

This commit is contained in:
Roland Conybeare 2025-08-06 22:34:20 -05:00
commit 13f4fb0935
26 changed files with 473 additions and 203 deletions

View file

@ -75,6 +75,18 @@ namespace xo {
return Reflect::make_tp(const_cast<List*>(this));
}
void
List::display(std::ostream & os) const {
gp<List> l = const_cast<List*>(this);
os << "(";
while (!l->is_nil()) {
os << l->head();
l = l->rest();
}
os << ")";
}
std::size_t
List::_shallow_size() const {
return sizeof(List);