xo-alloc2 xo-object: bugfix + refactor -> IGCObject_DList builds

This commit is contained in:
Roland Conybeare 2025-12-14 13:52:29 -05:00
commit 1caa002faa
5 changed files with 111 additions and 1 deletions

View file

@ -5,9 +5,11 @@
#pragma once
#include <cstdint>
namespace xo {
namespace scm {
using DInteger = double;
using DInteger = std::int64_t;
} /*nmaespace obj*/
} /*namespace xo*/

View file

@ -0,0 +1,26 @@
/** @file DList.hpp
*
* @author Roland Conybeare, Dec 2025
**/
#include "xo/alloc2/RGCObject.hpp"
#include "xo/alloc2/IGCObject_Any.hpp"
#include "xo/facet/obj.hpp"
namespace xo {
namespace scm {
struct DList {
using AGCObject = xo::mm::AGCObject;
DList(xo::obj<AGCObject> h,
xo::obj<AGCObject> r) : head_{h}, rest_{r} {}
obj<AGCObject> head_;
obj<AGCObject> rest_;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DList.hpp */

View file

@ -0,0 +1,36 @@
/** @file IGCObject_DList.hpp
*
* @author Roland Conybeare, Dec 2025
**/
#pragma once
#include <xo/alloc2/AAllocator.hpp>
#include <xo/alloc2/RAllocator.hpp>
#include <xo/alloc2/ACollector.hpp>
#include <xo/alloc2/ICollector_Any.hpp>
#include <xo/alloc2/RCollector.hpp>
#include <xo/alloc2/AGCObject.hpp>
#include <xo/alloc2/IGCObject_Xfer.hpp>
#include "DList.hpp"
namespace xo {
namespace scm {
/* changes here coordinate with:
* IGCObject_XFer
*/
struct IGCObject_DList {
public:
using AAllocator = xo::mm::AAllocator;
using ACollector = xo::mm::ACollector;
using size_type = std::size_t;
static size_type shallow_size(const DList & d) noexcept;
static DList * shallow_copy(const DList & d, obj<AAllocator> mm) noexcept;
static size_type forward_children(DList & d, obj<ACollector> gc) noexcept;
};
} /*namespace scm*/
} /*namespace xo*/
/* end IGCObject_DList.hpp */