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

@ -0,0 +1,13 @@
/** @file Collector.hpp
*
* @author Roland Conybeare, Dec 2025
**/
#pragma once
#include "gc/ACollector.hpp"
#include "gc/ICollector_Any.hpp"
#include "gc/ICollector_Xfer.hpp"
#include "gc/RCollector.hpp"
/* end Collector.hpp */

View file

@ -13,10 +13,10 @@
#pragma once
#include "detail/AGCObject.hpp"
#include "detail/IGCObject_Any.hpp"
#include "detail/IGCObject_Xfer.hpp"
#include "detail/RGCObject.hpp"
#include "gc/AGCObject.hpp"
#include "gc/IGCObject_Any.hpp"
#include "gc/IGCObject_Xfer.hpp"
#include "gc/RGCObject.hpp"
namespace xo {
namespace mm {

View file

@ -31,7 +31,8 @@ namespace xo {
* Implementations of AAllocator will downcast to a
* to some specific representation.
**/
struct AAllocator {
class AAllocator {
public:
/** @defgroup mm-allocator-type-traits allocator type traits **/
///@{
/** memory size report **/

View file

@ -11,8 +11,8 @@
#include <xo/facet/typeseq.hpp>
#include <xo/facet/obj.hpp>
#include "generation.hpp"
#include "role.hpp"
#include <xo/alloc2/generation.hpp>
#include <xo/alloc2/role.hpp>
#include <cstdint>
#include <cstddef>

View file

@ -15,7 +15,7 @@
// includes (via {facet_includes})
#include <xo/alloc2/Allocator.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <cstdint>
#include <cstddef>
#include <xo/facet/obj.hpp>
@ -31,7 +31,7 @@ using Copaque = const void *;
using Opaque = void *;
/**
GC hooks for collector-aware data
GC hooks for collector-aware data
**/
class AGCObject {
public:

View file

@ -14,7 +14,7 @@
#pragma once
#include <xo/alloc2/Allocator.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <cstdint>
#include <cstddef>

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>

View file

@ -1,13 +0,0 @@
/** @file Collector.hpp
*
* @author Roland Conybeare, Dec 2025
**/
#pragma once
#include "detail/ACollector.hpp"
#include "detail/ICollector_Any.hpp"
#include "detail/ICollector_Xfer.hpp"
#include "detail/RCollector.hpp"
/* end Collector.hpp */

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/facet/obj.hpp>

View file

@ -3,8 +3,8 @@
* @author Roland Conybeare, Dec 2025
**/
#include "ACollector.hpp"
#include "ICollector_Xfer.hpp"
#include <xo/alloc2/gc/ACollector.hpp>
#include <xo/alloc2/gc/ICollector_Xfer.hpp>
#include "DX1Collector.hpp"
namespace xo {

View file

@ -3,13 +3,14 @@
* @author Roland Conybeare, Dec 2025
**/
#include "Allocator.hpp"
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "detail/IAllocator_DX1Collector.hpp"
#include "detail/ICollector_DX1Collector.hpp"
#include "arena/IAllocator_DArena.hpp"
#include "xo/gc/DX1Collector.hpp"
#include "xo/gc/DX1CollectorIterator.hpp"
#include "generation.hpp"
#include <xo/gc/DX1Collector.hpp>
#include <xo/gc/DX1CollectorIterator.hpp>
#include <xo/alloc2/generation.hpp>
#include "object_age.hpp"
#include <xo/facet/obj.hpp>
#include <xo/indentlog/scope.hpp>

View file

@ -3,7 +3,7 @@
* @author Roland Conybeare, Dec 2025
**/
#include "detail/ICollector_Any.hpp"
#include "gc/ICollector_Any.hpp"
#include <iostream>
#include <exception>

View file

@ -2,7 +2,7 @@
*
**/
#include "detail/IGCObject_Any.hpp"
#include "gc/IGCObject_Any.hpp"
#include <iostream>
#include <exception>

View file

@ -7,7 +7,7 @@
#include "VsmInstr.hpp"
#include <xo/expression2/DefineExpr.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
namespace xo {
namespace scm {

View file

@ -7,7 +7,7 @@
#include "VsmInstr.hpp"
#include <xo/expression2/IfElseExpr.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
namespace xo {
namespace scm {
@ -61,7 +61,7 @@ namespace xo {
bool pretty(const ppindentinfo & ppii) const noexcept;
///@}
private:
/** @defgroup scm-vsmevalsequenceframe-members member variables **/
///@{

View file

@ -7,7 +7,7 @@
#include "VsmInstr.hpp"
#include <xo/expression2/SequenceExpr.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
namespace xo {
namespace scm {
@ -50,7 +50,7 @@ namespace xo {
///@{
uint32_t incr_i_seq() noexcept { return ++(this->i_seq_); }
///@}
/** @defgroup scm-vsmevalsequenceframe-gcobject-facet gcobject facet **/
///@{
@ -66,7 +66,7 @@ namespace xo {
bool pretty(const ppindentinfo & ppii) const noexcept;
///@}
private:
/** @defgroup scm-vsmevalsequenceframe-members member variables **/
///@{

View file

@ -13,7 +13,7 @@
#include <xo/object2/RuntimeError.hpp>
#include <xo/reader2/SchematikaReader.hpp>
#include <xo/expression2/Expression.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/abox.hpp>
#include <variant>

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 "DVsmDefContFrame.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 "DClosure.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 "DLocalEnv.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 "DVsmApplyClosureFrame.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 "DVsmApplyFrame.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 "DVsmEvalArgsFrame.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 "DGlobalEnv.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 "DLocalEnv.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 "DVsmIfElseContFrame.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

@ -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 "DVsmSeqContFrame.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -5,7 +5,7 @@
#include "DVsmDefContFrame.hpp"
#include <xo/expression2/DefineExpr.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
namespace xo {
namespace scm {

View file

@ -7,7 +7,7 @@
#include "NumericOps.hpp"
#include <xo/procedure2/RuntimeContext.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/arena/DArenaHashMap.hpp>
#include <xo/reflectutil/typeseq.hpp>

View file

@ -7,7 +7,7 @@
#include <xo/numeric/Numeric.hpp>
#include <xo/procedure2/RuntimeContext.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/facet/obj.hpp>
namespace xo {

View file

@ -5,8 +5,8 @@
#pragma once
#include <xo/gc/GCObject.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>
#include <xo/facet/obj.hpp>

View file

@ -7,8 +7,8 @@
#include "DArray.hpp"
#include "DString.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>

View file

@ -6,7 +6,7 @@
#pragma once
#include <xo/alloc2/Allocator.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>
#include <xo/facet/obj.hpp>

View file

@ -5,7 +5,7 @@
#pragma once
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>

View file

@ -6,7 +6,7 @@
#pragma once
#include <xo/alloc2/Allocator.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>
#include <string_view>
@ -15,6 +15,8 @@
//#include <cstdio>
namespace xo {
namespace mm { class ACollector; }
namespace scm {
/** @class DString
* @brief String implementation with gc hooks
@ -111,14 +113,7 @@ namespace xo {
static DString * printf(obj<AAllocator> mm,
size_type cap,
const char * fmt,
Args&&... args)
{
DString * result = DString::empty(mm, cap);
if (result) {
result->sprintf(fmt, std::forward<Args>(args)...);
}
return result;
}
Args&&... args);
///@}
/** @defgroup dstring-access access methods **/
@ -252,8 +247,10 @@ namespace xo {
/** clone string, using memory from allocator @p mm **/
DString * shallow_copy(obj<AAllocator> mm) const noexcept;
/** fixup child pointers (trivial for DString, no children) **/
size_type forward_children(obj<ACollector> gc) noexcept;
/** fixup child pointers (trivial for DString, no children)
* note: cref so we can use forward decl
**/
///@}
@ -285,6 +282,24 @@ namespace xo {
///@}
};
/** create string using printf-style formatting.
* Use memory from allocator @p mm with capacity @p cap.
* Truncates if result exceeds capacity.
* @return pointer to newly created DString
**/
template <typename... Args>
DString * DString::printf(obj<AAllocator> mm,
size_type cap,
const char * fmt,
Args&&... args)
{
DString * result = DString::empty(mm, cap);
if (result) {
result->sprintf(fmt, std::forward<Args>(args)...);
}
return result;
}
inline std::ostream & operator<<(std::ostream & os, const DString * x) {
if (x) {
os << std::string_view(*x);

View file

@ -9,4 +9,6 @@
#include "string/IGCObject_DString.hpp"
#include "string/IPrintable_DString.hpp"
#include <xo/alloc2/Allocator.hpp>
/* end String.hpp */

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 "DArray.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 "DBoolean.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 "DDictionary.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -15,7 +15,7 @@
#include "GCObject.hpp"
#include <xo/object2/number/GCObjectConversion_DFloat.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include "DFloat.hpp"
@ -65,4 +65,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 "DInteger.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
// includes (via {facet_includes})
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/facet/obj.hpp>
#include <xo/facet/facet_implementation.hpp>
#include <xo/facet/typeseq.hpp>

View file

@ -13,7 +13,7 @@
#pragma once
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.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 "DString.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -6,7 +6,7 @@
#include "DList.hpp"
#include "list/IPrintable_DList.hpp"
#include "list/IGCObject_DList.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/facet/facet_implementation.hpp>

View file

@ -4,12 +4,13 @@
**/
#include "DString.hpp"
#include <xo/alloc2/Allocator.hpp>
#include <xo/indentlog/print/pretty.hpp>
#include <algorithm>
#include <cstring>
namespace xo {
using xo::facet::typeseq;
using xo::reflect::typeseq;
using xo::print::ppdetail_atomic;
namespace scm {

View file

@ -5,6 +5,7 @@
#include "init_object2.hpp"
#include "StringOps.hpp"
#include <xo/alloc2/Allocator.hpp>
#include <xo/alloc2/arena/IAllocator_DArena.hpp>
#include <catch2/catch.hpp>
#include <cctype>

View file

@ -19,7 +19,7 @@
#include <xo/object2/DInteger.hpp>
#include <xo/object2/number/IGCObject_DInteger.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/gc/DX1Collector.hpp>
#include <xo/gc/detail/IAllocator_DX1Collector.hpp>
#include <xo/gc/detail/ICollector_DX1Collector.hpp>

View file

@ -16,7 +16,7 @@
#include "list/IGCObject_DList.hpp"
#include <xo/gc/CollectorTypeRegistry.hpp>
#include <xo/gc/Collector.hpp>
#include <xo/alloc2/Collector.hpp>
#include <xo/gc/DX1Collector.hpp>
#include <xo/gc/detail/IAllocator_DX1Collector.hpp>

View file

@ -20,4 +20,6 @@
#include "detail/ppdetail_Printable.hpp"
/* end Printable.hpp */
#include <xo/alloc2/Allocator.hpp>
/* end Printable.hpp */

View file

@ -8,7 +8,7 @@
#include "RuntimeContext.hpp"
#include <xo/object2/DArray.hpp>
#include <xo/gc/GCObjectConversion.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/reflect/Reflect.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/facet/FacetRegistry.hpp>

View file

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

View file

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

View file

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

View file

@ -7,7 +7,7 @@
#include <xo/object2/Dictionary.hpp>
#include <xo/object2/String.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include "DPrimitive.hpp"
namespace xo {

View file

@ -15,7 +15,7 @@
// includes (via {facet_includes})
#include "RuntimeContext.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/facet/obj.hpp>
#include <xo/facet/facet_implementation.hpp>
#include <xo/facet/typeseq.hpp>

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 "DPrimitive_gco_0.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 "DPrimitive_gco_1_gco.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 "DPrimitive_gco_2_gco_gco.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 "DPrimitive_gco_3_dict_string_gco.hpp"
@ -64,4 +64,4 @@ namespace xo {
} /*namespace scm*/
} /*namespace xo*/
/* end */
/* end */

View file

@ -14,7 +14,7 @@
#pragma once
#include "RuntimeContext.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.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

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

View file

@ -4,7 +4,7 @@
**/
#include "DPrimitive.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
namespace xo {
namespace scm {

View file

@ -10,7 +10,7 @@
#include "Primitive_gco_2_gco_gco.hpp"
#include "Primitive_gco_3_dict_string_gco.hpp"
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/GCObject.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/indentlog/scope.hpp>

View file

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

Some files were not shown because too many files have changed in this diff Show more