xo-interpreter2 stack: OUTPUT_CPP_DIR cmake->idl/

This commit is contained in:
Roland Conybeare 2026-02-16 17:46:51 -05:00
commit cd143dce29
8 changed files with 26 additions and 14 deletions

View file

@ -25,7 +25,6 @@ xo_add_genfacet(
INPUT idl/GCObject.json5
OUTPUT_HPP_DIR include/xo/gc
OUTPUT_IMPL_SUBDIR detail
OUTPUT_CPP_DIR src/gc
)
# ----------------------------------------------------------------

View file

@ -1,5 +1,6 @@
{
mode: "facet",
output_cpp_dir: "src/gc",
includes: [
"<xo/alloc2/Allocator.hpp>",
"<xo/gc/Collector.hpp>",

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for facet .hpp file:
@ -45,4 +45,3 @@ namespace xo {
}
/* end GCObject.hpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for abstract facet .hpp file:
@ -55,6 +55,8 @@ public:
// const methods
/** RTTI: unique id# for actual runtime data representation **/
virtual typeseq _typeseq() const noexcept = 0;
/** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/
virtual void _drop(Opaque d) const noexcept = 0;
/** memory consumption for this instance **/
virtual size_type shallow_size(Copaque data) const noexcept = 0;
/** copy instance using allocator **/
@ -82,4 +84,4 @@ using IGCObject_ImplType = xo::facet::FacetImplType<AGCObject, DRepr>;
} /*namespace mm*/
} /*namespace xo*/
/* AGCObject.hpp */
/* AGCObject.hpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for abstract facet .hpp file:
@ -56,8 +56,11 @@ namespace mm {
// from AGCObject
// const methods
// builtin methods
typeseq _typeseq() const noexcept override { return s_typeseq; }
[[noreturn]] void _drop(Opaque) const noexcept override { _fatal(); }
// const methods
[[noreturn]] size_type shallow_size(Copaque) const noexcept override { _fatal(); }
[[noreturn]] Opaque shallow_copy(Copaque, obj<AAllocator>) const noexcept override { _fatal(); }
@ -87,4 +90,4 @@ namespace mm {
} /*namespace mm */
} /*namespace xo */
/* IGCObject_Any.hpp */
/* IGCObject_Any.hpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for abstract facet .hpp file:
@ -44,8 +44,11 @@ namespace mm {
// from AGCObject
// const methods
// builtin methods
typeseq _typeseq() const noexcept override { return s_typeseq; }
void _drop(Opaque d) const noexcept override { _dcast(d).~DRepr(); }
// const methods
size_type shallow_size(Copaque data) const noexcept override {
return I::shallow_size(_dcast(data));
}
@ -89,4 +92,4 @@ namespace mm {
} /*namespace mm */
} /*namespace xo*/
/* end IGCObject_Xfer.hpp */
/* end IGCObject_Xfer.hpp */

View file

@ -2,7 +2,7 @@
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for abstract facet .hpp file:
@ -48,8 +48,13 @@ public:
/** @defgroup mm-gcobject-router-methods **/
///@{
// const methods
// explicit injected content
// builtin methods
typeseq _typeseq() const noexcept { return O::iface()->_typeseq(); }
void _drop() const noexcept { O::iface()->_drop(O::data()); }
// const methods
size_type shallow_size() const noexcept {
return O::iface()->shallow_size(O::data());
}

View file

@ -44,4 +44,4 @@ IGCObject_Any::forward_children(Opaque, obj<ACollector>) const noexcept -> siz
} /*namespace mm*/
} /*namespace xo*/
/* end IGCObject_Any.cpp */
/* end IGCObject_Any.cpp */