xo-object2: streamline write barriers for DList,DArray muts

This commit is contained in:
Roland Conybeare 2026-05-01 20:38:38 -04:00
commit 96ebc02d4a
3 changed files with 3 additions and 18 deletions

View file

@ -67,7 +67,7 @@ namespace xo {
void assign_head(obj<AAllocator> mm, obj<AGCObject> h);
void assign_head_gc(obj<ACollector> gc, obj<AGCObject> h);
/** assign rest-pointer. Caller responsible for preserving acyclic property! **/
void _assign_rest(DList * r);
void _assign_rest(obj<AAllocator> mm, DList * r);
/** pretty-printing driver; combine layout+printing **/
bool pretty(const ppindentinfo & ppii) const;

View file

@ -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;

View file

@ -141,20 +141,15 @@ namespace xo {
}
void
DList::_assign_rest(DList * rest)
DList::_assign_rest(obj<AAllocator> mm, DList * rest)
{
scope log(XO_DEBUG(true), "need write barrier");
#ifdef NOT_YET
obj<AGCObject,DList> 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