From 8ec0da02484857618b730e807b80de8eb24e7a2b Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 1 May 2026 20:14:26 -0400 Subject: [PATCH] xo-object2 stack: RAllocator.assign_barrier() works. use for DList::assign_head(), DArray::assign_at(). --- include/xo/alloc2/Allocator.hpp | 6 +----- include/xo/alloc2/Allocator_basic.hpp | 2 -- include/xo/alloc2/alloc/RAllocator_aux.hpp | 18 ++++++++++++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/xo/alloc2/Allocator.hpp b/include/xo/alloc2/Allocator.hpp index 096b7b8..9e7230d 100644 --- a/include/xo/alloc2/Allocator.hpp +++ b/include/xo/alloc2/Allocator.hpp @@ -5,11 +5,7 @@ #pragma once -#include "alloc/AAllocator.hpp" -#include "alloc/IAllocator_Any.hpp" -#include "alloc/IAllocator_Xfer.hpp" -#include "alloc/RAllocator.hpp" - +#include "Allocator_basic.hpp" #include "alloc/RAllocator_aux.hpp" /* end Allocator.hpp */ diff --git a/include/xo/alloc2/Allocator_basic.hpp b/include/xo/alloc2/Allocator_basic.hpp index df998cd..60e4e98 100644 --- a/include/xo/alloc2/Allocator_basic.hpp +++ b/include/xo/alloc2/Allocator_basic.hpp @@ -10,6 +10,4 @@ #include "alloc/IAllocator_Xfer.hpp" #include "alloc/RAllocator.hpp" -//#include "alloc/RAllocator_aux.hpp" - /* end Allocator_basic.hpp */ diff --git a/include/xo/alloc2/alloc/RAllocator_aux.hpp b/include/xo/alloc2/alloc/RAllocator_aux.hpp index 2b296a9..b6e6f0d 100644 --- a/include/xo/alloc2/alloc/RAllocator_aux.hpp +++ b/include/xo/alloc2/alloc/RAllocator_aux.hpp @@ -3,7 +3,7 @@ * Out-of-line definitions for RAllocator template methods * that depend on RGCObject (avoiding #include cycle in RAllocator.hpp) * - * Would aspire to Include via user_hpp_includes in Allocator.json5, + * Would aspire to include via user_hpp_includes in Allocator.json5, * if/when that exists * * @author Roland Conybeare @@ -17,15 +17,25 @@ namespace xo { namespace mm { + /** NOTE: + * this definition is incorporated into [Allocator.hpp], + * while consciously omitted from [Allocator_basic.hpp]. + * + * Some .hpp files in {xo-alloc2/, xo-gc/} can + * only include [Allocator_basic.hpp]. + * + * Translation units that want to invoke + * barrier_assign() must #include Allocator.hpp + **/ template void RAllocator::barrier_assign(void * parent, obj * p_lhs, obj rhs) noexcept { - (void)parent; - (void)p_lhs; - (void)rhs; + this->barrier_assign_aux(parent, + p_lhs->iface(), p_lhs->opaque_data_addr(), + rhs.iface(), rhs.opaque_data()); } } /*namespace mm*/