xo-gc xo-alloc2: move Collector faceet gc/ -> alloc2/ for levelling

This commit is contained in:
Roland Conybeare 2026-03-04 22:26:31 +11:00
commit b1add3bbff
102 changed files with 192 additions and 172 deletions

View file

@ -8,8 +8,8 @@
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/gc/Collector.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/reflect/TaggedPtr.hpp>
namespace xo {

View file

@ -8,7 +8,7 @@
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/Allocator.hpp>
//#include <vector>
#include <string>

View file

@ -1,5 +1,5 @@
/** @file DUniqueString.hpp
*
*
* @author Roland Conybeare, Jan 2026
**/
@ -69,12 +69,7 @@ namespace xo {
/** compare unique strings: return n with {n<0, n=0, n>0}
* when @p lhs lexicographically {before, at, after} @p rhs
**/
static int compare(const DUniqueString & lhs, const DUniqueString & rhs) {
if (&lhs == &rhs)
return 0;
return DString::compare(*(lhs._text()), *(rhs._text()));
}
static int compare(const DUniqueString & lhs, const DUniqueString & rhs);
std::size_t hash() const noexcept { return _text()->hash(); }
operator std::string_view() const noexcept { return std::string_view(*_text()); }
@ -124,14 +119,6 @@ namespace xo {
///@}
friend class StringTable;
private:
#ifdef NOPE
/** interned string. Note stringtable memory distinct from gc memory,
* so gc will not (and should not) traverse this pointer.
**/
const DString * text_ = nullptr;
#endif
};
/* since unique: just compare addresses */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DDefineExpr.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DApplyExpr.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DConstant.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DIfElseExpr.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DLambdaExpr.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DSequenceExpr.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DUniqueString.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DVarRef.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DVariable.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
namespace xo {
namespace scm {

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
namespace xo {
namespace scm {

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DGlobalSymtab.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "GCObject.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DLocalSymtab.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -5,7 +5,7 @@
#include "DDefineExpr.hpp"
#include "Variable.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/gc/PolyForwarderUtil.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>

View file

@ -8,7 +8,7 @@
#include <xo/expression2/Expression.hpp>
#include <xo/expression2/Variable.hpp>
#include <xo/object2/Array.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/indentlog/scope.hpp>

View file

@ -5,7 +5,7 @@
#include "DIfElseExpr.hpp"
#include "detail/IExpression_DIfElseExpr.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/reflectutil/typeseq.hpp>

View file

@ -7,7 +7,7 @@
#include "detail/IExpression_DSequenceExpr.hpp"
#include <xo/object2/array/IGCObject_DArray.hpp>
#include <xo/object2/array/IPrintable_DArray.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>

View file

@ -4,6 +4,7 @@
**/
#include "DUniqueString.hpp"
#include "DString.hpp"
#include <xo/arena/padding.hpp>
#include <xo/indentlog/scope.hpp>
#include <cstring>
@ -13,6 +14,15 @@ namespace xo {
using xo::facet::typeseq;
namespace scm {
int
DUniqueString::compare(const DUniqueString & lhs, const DUniqueString & rhs)
{
if (&lhs == &rhs)
return 0;
return DString::compare(*(lhs._text()), *(rhs._text()));
}
DString *
DUniqueString::_text() const noexcept
{

View file

@ -5,8 +5,8 @@
#include "DVariable.hpp"
#include "exprtype.hpp"
#include <cstddef>
#include <xo/indentlog/print/quoted.hpp>
#include <cstddef>
namespace xo {
using xo::mm::ACollector;

View file

@ -25,7 +25,7 @@
#include <xo/expression2/GlobalSymtab.hpp>
#include <xo/expression2/LocalSymtab.hpp>
#include <xo/gc/detail/AGCObject.hpp>
#include <xo/alloc2/gc/AGCObject.hpp>
#include <xo/printable2/detail/APrintable.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/indentlog/scope.hpp>