From d0fea5fcf1a69777ec4c2c72ae223b92b7471c45 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 12 Apr 2026 15:06:01 -0400 Subject: [PATCH] xo-gc: missed files in prev commit --- include/xo/gc/setup_gc.hpp | 20 ++++++++++++++++++ src/gc/setup_gc.cpp | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 include/xo/gc/setup_gc.hpp create mode 100644 src/gc/setup_gc.cpp diff --git a/include/xo/gc/setup_gc.hpp b/include/xo/gc/setup_gc.hpp new file mode 100644 index 0000000..bf5c5c6 --- /dev/null +++ b/include/xo/gc/setup_gc.hpp @@ -0,0 +1,20 @@ +/** @file SetupGc.hpp + * + * @author Roland Conybeare, Mar 2026 + **/ + +#pragma once + +namespace xo { + namespace mm { + + class SetupGc { + public: + /** Register gc (facet,impl) combinations with FacetRegistry **/ + static bool register_facets(); + }; + + } /*namespace mm*/ +} /*namespace xo*/ + +/* end SetupGc.hpp */ diff --git a/src/gc/setup_gc.cpp b/src/gc/setup_gc.cpp new file mode 100644 index 0000000..23beed5 --- /dev/null +++ b/src/gc/setup_gc.cpp @@ -0,0 +1,42 @@ +/** @file setup_gc.cpp + * + * @author Roland Conybeare, Mar 2026 + **/ + +#include "setup_gc.hpp" +#include "X1Collector.hpp" +#include "GCObjectStoreVisitor.hpp" +#include +#include + +namespace xo { + using xo::mm::AAllocator; + using xo::mm::ACollector; + using xo::mm::DX1Collector; + using xo::facet::FacetRegistry; + using xo::reflect::typeseq; + + namespace mm { + + bool + SetupGc::register_facets() + { + scope log(XO_DEBUG(true)); + + FacetRegistry::register_impl(); + FacetRegistry::register_impl(); + + FacetRegistry::register_impl(); + + log && log(xtag("DX1Collector.tseq", typeseq::id())); + log && log(xtag("DGCObjectStoreVisitor.tseq", typeseq::id())); + + log && log(xtag("ACollector.tseq", typeseq::id())); + log && log(xtag("AGCObjectVisitor.tseq", typeseq::id())); + + return true; + } + } +} /*namespace xo*/ + +/* end setup_gc.cpp */