xo-expression2: + GCObject,Printable facets for DSequenceExpr

This commit is contained in:
Roland Conybeare 2026-01-31 12:40:50 -05:00
commit 440d43e109
57 changed files with 348 additions and 46 deletions

View file

@ -36,6 +36,8 @@ set(SELF_SRCS
IPrintable_DIfElseExpr.cpp
IExpression_DSequenceExpr.cpp
IGCObject_DSequenceExpr.cpp
IPrintable_DSequenceExpr.cpp
DLocalSymtab.cpp
DGlobalSymtab.cpp

View file

@ -5,6 +5,7 @@
#include "DSequenceExpr.hpp"
#include "detail/IExpression_DSequenceExpr.hpp"
#include <xo/object2/array/IGCObject_DArray.hpp>
#include <xo/gc/GCObject.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/printable2/Printable.hpp>
@ -99,6 +100,39 @@ namespace xo {
"DSequenceExpr");
}
// gc hooks for IGCObject_DSequenceExpr
std::size_t
DSequenceExpr::shallow_size() const noexcept
{
return sizeof(DSequenceExpr);
}
DSequenceExpr *
DSequenceExpr::shallow_copy(obj<AAllocator> mm) const noexcept
{
DSequenceExpr * copy = (DSequenceExpr *)mm.alloc_copy((std::byte *)this);
if (copy)
*copy = *this;
return copy;
}
std::size_t
DSequenceExpr::forward_children(obj<ACollector> gc) noexcept
{
// WARNING.
// if this proves problematic,
// may resort to obj<AGCObject,DArray> for expr_v_ member
auto iface = facet::impl_for<AGCObject,DArray>();
gc.forward_inplace(&iface, (void**)&expr_v_);
return shallow_size();
}
} /*namespace scm*/
} /*namespace xo*/

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DApplyExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DConstant.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DDefineExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DIfElseExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DLambdaExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DSequenceExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IExpression_DVariable.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -0,0 +1,39 @@
/** @file IGCObject_DSequenceExpr.cpp
*
* Generated automagically from ingredients:
* 1. code generator:
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IGCObject_DSequenceExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:
* [iface_facet_any.hpp.j2]
* 3. idl for facet methods
* [idl/IGCObject_DSequenceExpr.json5]
**/
#include "detail/IGCObject_DSequenceExpr.hpp"
namespace xo {
namespace scm {
auto
IGCObject_DSequenceExpr::shallow_size(const DSequenceExpr & self) noexcept -> size_type
{
return self.shallow_size();
}
auto
IGCObject_DSequenceExpr::shallow_copy(const DSequenceExpr & self, obj<AAllocator> mm) noexcept -> Opaque
{
return self.shallow_copy(mm);
}
auto
IGCObject_DSequenceExpr::forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept -> size_type
{
return self.forward_children(gc);
}
} /*namespace scm*/
} /*namespace xo*/
/* end IGCObject_DSequenceExpr.cpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IGCObject_DUniqueString.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IGCObject_DVariable.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DApplyExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DConstant.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DDefineExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DIfElseExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DLambdaExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DLocalSymtab.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -0,0 +1,28 @@
/** @file IPrintable_DSequenceExpr.cpp
*
* Generated automagically from ingredients:
* 1. code generator:
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DSequenceExpr.json5]
* 2. jinja2 template for abstract facet .hpp file:
* [iface_facet_any.hpp.j2]
* 3. idl for facet methods
* [idl/IPrintable_DSequenceExpr.json5]
**/
#include "detail/IPrintable_DSequenceExpr.hpp"
namespace xo {
namespace scm {
auto
IPrintable_DSequenceExpr::pretty(const DSequenceExpr & self, const ppindentinfo & ppii) -> bool
{
return self.pretty(ppii);
}
} /*namespace scm*/
} /*namespace xo*/
/* end IPrintable_DSequenceExpr.cpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DUniqueString.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DVariable.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/ISymbolTable_DLocalSymtab.json5]
* 2. jinja2 template for abstract facet .hpp file:

View file

@ -27,6 +27,10 @@
#include <xo/expression2/detail/IExpression_DIfElseExpr.hpp>
#include <xo/expression2/detail/IPrintable_DIfElseExpr.hpp>
#include <xo/expression2/detail/IExpression_DSequenceExpr.hpp>
#include <xo/expression2/detail/IGCObject_DSequenceExpr.hpp>
#include <xo/expression2/detail/IPrintable_DSequenceExpr.hpp>
#include <xo/expression2/symtab/ISymbolTable_DLocalSymtab.hpp>
#include <xo/expression2/symtab/IPrintable_DLocalSymtab.hpp>
@ -77,6 +81,10 @@ namespace xo {
FacetRegistry::register_impl<AExpression, DIfElseExpr>();
FacetRegistry::register_impl<APrintable, DIfElseExpr>();
FacetRegistry::register_impl<AExpression, DSequenceExpr>();
FacetRegistry::register_impl<AGCObject, DSequenceExpr>();
FacetRegistry::register_impl<APrintable, DSequenceExpr>();
FacetRegistry::register_impl<ASymbolTable, DLocalSymtab>();
FacetRegistry::register_impl<APrintable, DLocalSymtab>();
@ -87,6 +95,7 @@ namespace xo {
log && log(xtag("DApplyExpr.tseq", typeseq::id<DApplyExpr>()));
log && log(xtag("DLambdaExpr.tseq", typeseq::id<DLambdaExpr>()));
log && log(xtag("DIfElseExpr.tseq", typeseq::id<DIfElseExpr>()));
log && log(xtag("DSequenceExpr.tseq", typeseq::id<DSequenceExpr>()));
log && log(xtag("DLocalSymtab.tseq", typeseq::id<DLocalSymtab>()));