From 27564ec4a7ed72e02549f926f6edbbda2989c50e Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 24 Mar 2026 22:17:41 -0400 Subject: [PATCH] xo-procedure2: + assign_head + set-car pm impl [WIP] Not actuall installed in global env --- include/xo/object2/DList.hpp | 2 ++ src/object2/DList.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/xo/object2/DList.hpp b/include/xo/object2/DList.hpp index 8009f7b..ddc54f3 100644 --- a/include/xo/object2/DList.hpp +++ b/include/xo/object2/DList.hpp @@ -57,6 +57,8 @@ namespace xo { /** return element at 0-based index @p ix **/ obj at(size_type ix) const; + /** assign head **/ + void assign_head(obj gc, obj h); /** assign rest-pointer **/ void assign_rest(DList * r); diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index 7ef06f3..b9ac058 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -119,6 +119,14 @@ namespace xo { return l->head_; } + void + DList::assign_head(obj gc, obj rhs) + { + scope log(XO_DEBUG(true), xtag("gc.data", gc.data_)); + + mm_do_assign(gc, this, &head_, rhs); + } + void DList::assign_rest(DList * r) {