refactor: xo-gc: + GCObjectVisitor.generation_of()

Concession to narrow MutationLogStore to only use GCObjectVisitor
instead of assuming X1Collector.
This commit is contained in:
Roland Conybeare 2026-04-06 23:18:45 -04:00
commit b9e4a36d47
3 changed files with 13 additions and 4 deletions

View file

@ -48,6 +48,9 @@ namespace xo {
/** allocation metadata for gc-aware data at address @p gco.
@p gco must be the result of a call to collector's alloc() function **/
static AllocInfo alloc_info(const DX1Collector & self, void * addr);
/** generation to which pointer @p addr belongs, given role @p r;
sentinel if @p addr is not owned by collector **/
static Generation generation_of(const DX1Collector & self, role r, const void * addr) noexcept;
// non-const methods
/** allocate copy of source object at address @p src.