From 26fd1e66f08e9ca4c17bf6f5eb891bedd8412232 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 14 Jan 2026 11:36:16 -0500 Subject: [PATCH] xo-facet xo-gc xo-alloc2: facet cleanup + use genfacet for GCObject --- idl/GCObject.json5 | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 idl/GCObject.json5 diff --git a/idl/GCObject.json5 b/idl/GCObject.json5 new file mode 100644 index 0000000..e826af2 --- /dev/null +++ b/idl/GCObject.json5 @@ -0,0 +1,59 @@ +{ + mode: "facet", + includes: [], + namespace1: "xo", + namespace2: "scm", + facet: "GCObject", + detail_subdir: "detail", + brief: "xxx", + using_doxygen: true, + doc: [ + "GC hooks for collector-aware data" + ], + types: [ + // using size_type = std::size_t + { + name: "size_type", + doc: ["type for an amount of memory"], + definition: "std::size_t", + }, + ], + const_methods: [ + // size_type shallow_size() const noexcept + { + name: "shallow_size", + doc: ["memory consumption for this instance"], + return_type: "size_type", + args: [], + const: true, + noexcept: true, + attributes: [], + }, + // Opaque shallow_copy(obj>) const noexcept + { + name: "shallow_copy", + doc: ["copy instance using allocator"], + return_type: "Opaque", + args:[ + {types: "obj", name: "mm"}, + ], + const: true, + noexcept: true, + attributes: [], + }, + ], + nonconst_methods: [ + // size_type forward_children(obj) const noexcept + { + name: "size_type", + doc: ["during GC: forward immdiate children"]. + return_type: "size_type", + args: [ + {types: "obj", name: "gc"}, + ], + const: true, + noexcept: true, + attributes: [], + }, + ], +} \ No newline at end of file