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 39ae54167f
28 changed files with 94 additions and 66 deletions

View file

@ -36,6 +36,8 @@ namespace xo {
using ACollector = xo::mm::ACollector;
/** gc-aware object facet **/
using AGCObject = xo::mm::AGCObject;
/** gc-centric object visitor **/
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
/** pretty-printer state for APrintable **/
using ppindentinfo = xo::print::ppindentinfo;
@ -148,7 +150,7 @@ namespace xo {
/** move to new address, mandated by @p gc **/
DArray * shallow_move(obj<ACollector> gc) noexcept;
/** forward elements to @p gc to-space; replace originals with forarding pointers **/
void forward_children(obj<ACollector> gc) noexcept;
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
///@}
private: