xo-procedure2: + assign_head + set-car pm impl [WIP]

Not actuall installed in global env
This commit is contained in:
Roland Conybeare 2026-03-24 22:17:41 -04:00
commit 27564ec4a7
2 changed files with 10 additions and 0 deletions

View file

@ -57,6 +57,8 @@ namespace xo {
/** return element at 0-based index @p ix **/
obj<AGCObject> at(size_type ix) const;
/** assign head **/
void assign_head(obj<ACollector> gc, obj<AGCObject> h);
/** assign rest-pointer **/
void assign_rest(DList * r);

View file

@ -119,6 +119,14 @@ namespace xo {
return l->head_;
}
void
DList::assign_head(obj<ACollector> gc, obj<AGCObject> rhs)
{
scope log(XO_DEBUG(true), xtag("gc.data", gc.data_));
mm_do_assign(gc, this, &head_, rhs);
}
void
DList::assign_rest(DList * r)
{