refactor: + narrower interface for gc pointer forwarding

add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
Roland Conybeare 2026-04-05 23:53:02 -04:00
commit fdc3054c7c
46 changed files with 187 additions and 165 deletions

View file

@ -90,14 +90,12 @@ namespace xo {
return gc.std_move_for(this);
}
std::size_t
DDefineExpr::forward_children(obj<ACollector> gc) noexcept
void
DDefineExpr::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
{
gc.forward_inplace(&lhs_var_);
gc.visit_child(&lhs_var_);
//gc.forward_inplace(&rhs_); // complicated - need to access via GCObject facet
poly_forward_inplace(gc, &rhs_);
return this->shallow_size();
gc.visit_poly_child(&rhs_);
}
bool