From c4983b217246d15d4b6ef8e214be0cd40801a51c Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 12 Apr 2026 15:38:42 -0400 Subject: [PATCH] xo-gc: doc: + comment on GCObjectVisitor entry points --- xo-alloc2/idl/GCObjectVisitor.json5 | 4 +++- xo-alloc2/include/xo/alloc2/gc/AGCObjectVisitor.hpp | 6 ++++-- .../xo/gc/detail/IGCObjectVisitor_DGCObjectStoreVisitor.hpp | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/xo-alloc2/idl/GCObjectVisitor.json5 b/xo-alloc2/idl/GCObjectVisitor.json5 index fe6fbb1c..07d99732 100644 --- a/xo-alloc2/idl/GCObjectVisitor.json5 +++ b/xo-alloc2/idl/GCObjectVisitor.json5 @@ -43,6 +43,7 @@ doc: [ "allocation metadata for gc-aware data at address @p gco.", "@p gco must be the result of a call to collector's alloc() function", + "note: load-bearing for xo-gc/MutationLogStore", ], return_type: "AllocInfo", args: [ @@ -57,7 +58,8 @@ name: "generation_of", doc: [ "generation to which pointer @p addr belongs, given role @p r;", - "sentinel if @p addr is not owned by collector", + "sentinel if @p addr is not owned by collector.", + "note: load-bearing for xo-gc/MutationLogStore", ], return_type: "Generation", args: [ diff --git a/xo-alloc2/include/xo/alloc2/gc/AGCObjectVisitor.hpp b/xo-alloc2/include/xo/alloc2/gc/AGCObjectVisitor.hpp index 86cd9b9a..71a1367a 100644 --- a/xo-alloc2/include/xo/alloc2/gc/AGCObjectVisitor.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/AGCObjectVisitor.hpp @@ -60,10 +60,12 @@ public: /** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/ virtual void _drop(Opaque d) const noexcept = 0; /** allocation metadata for gc-aware data at address @p gco. -@p gco must be the result of a call to collector's alloc() function **/ +@p gco must be the result of a call to collector's alloc() function +note: load-bearing for xo-gc/MutationLogStore **/ virtual AllocInfo alloc_info(Copaque data, void * addr) const = 0; /** generation to which pointer @p addr belongs, given role @p r; -sentinel if @p addr is not owned by collector **/ +sentinel if @p addr is not owned by collector. +note: load-bearing for xo-gc/MutationLogStore **/ virtual Generation generation_of(Copaque data, Role r, const void * addr) const noexcept = 0; // nonconst methods diff --git a/xo-gc/include/xo/gc/detail/IGCObjectVisitor_DGCObjectStoreVisitor.hpp b/xo-gc/include/xo/gc/detail/IGCObjectVisitor_DGCObjectStoreVisitor.hpp index de14f5b0..a7a987f7 100644 --- a/xo-gc/include/xo/gc/detail/IGCObjectVisitor_DGCObjectStoreVisitor.hpp +++ b/xo-gc/include/xo/gc/detail/IGCObjectVisitor_DGCObjectStoreVisitor.hpp @@ -46,10 +46,12 @@ namespace xo { ///@{ // const methods /** allocation metadata for gc-aware data at address @p gco. -@p gco must be the result of a call to collector's alloc() function **/ +@p gco must be the result of a call to collector's alloc() function +note: load-bearing for xo-gc/MutationLogStore **/ static AllocInfo alloc_info(const DGCObjectStoreVisitor & self, void * addr); /** generation to which pointer @p addr belongs, given role @p r; -sentinel if @p addr is not owned by collector **/ +sentinel if @p addr is not owned by collector. +note: load-bearing for xo-gc/MutationLogStore **/ static Generation generation_of(const DGCObjectStoreVisitor & self, Role r, const void * addr) noexcept; // non-const methods