From 96ebc02d4a4db45fabfae0e638d1b0ec76b1f437 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 1 May 2026 20:38:38 -0400 Subject: [PATCH] xo-object2: streamline write barriers for DList,DArray muts --- include/xo/object2/DList.hpp | 2 +- src/object2/DArray.cpp | 10 ---------- src/object2/DList.cpp | 9 ++------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/include/xo/object2/DList.hpp b/include/xo/object2/DList.hpp index b5c340c..fbc6478 100644 --- a/include/xo/object2/DList.hpp +++ b/include/xo/object2/DList.hpp @@ -67,7 +67,7 @@ namespace xo { void assign_head(obj mm, obj h); void assign_head_gc(obj gc, obj h); /** assign rest-pointer. Caller responsible for preserving acyclic property! **/ - void _assign_rest(DList * r); + void _assign_rest(obj mm, DList * r); /** pretty-printing driver; combine layout+printing **/ bool pretty(const ppindentinfo & ppii) const; diff --git a/src/object2/DArray.cpp b/src/object2/DArray.cpp index aeb0319..49c3d64 100644 --- a/src/object2/DArray.cpp +++ b/src/object2/DArray.cpp @@ -80,14 +80,8 @@ namespace xo { if (ix >= size_) return false; - scope log(XO_DEBUG(true), "need write barrier"); - mm.barrier_assign(this, &elts_[ix], x); - //mm.barrier_assign_aux(this, - // elts_[ix].iface(), elts_[ix].opaque_data_addr(), - // x.iface(), x.opaque_data()); - return true; } @@ -104,10 +98,6 @@ namespace xo { mm.barrier_assign(this, &elts_[size_], elt); - //mm.barrier_assign_aux(this, - // elts_[size_].iface(), elts_[size_].opaque_data_addr(), - // elt.iface(), elt.opaque_data()); - ++(this->size_); return true; diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index 75bde74..b8494c3 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -141,20 +141,15 @@ namespace xo { } void - DList::_assign_rest(DList * rest) + DList::_assign_rest(obj mm, DList * rest) { - scope log(XO_DEBUG(true), "need write barrier"); - -#ifdef NOT_YET obj rest_gco(rest); mm.barrier_assign_aux(this, nullptr /*lhs iface unused*/, - &(this->rest_), + (void**)&(this->rest_), rest_gco.iface(), rest); -#endif - this->rest_ = rest; } bool