From e95353f1c865a2d7403c2eb4627799d82a1a6314 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 6 Apr 2026 15:21:48 -0400 Subject: [PATCH] refactor: use GCObjectVisitor api w/ gco_shallow_move --- xo-alloc2/idl/GCObject.json5 | 9 ++++++--- xo-alloc2/idl/GCObjectVisitor.json5 | 20 +++++++++++++++++-- xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp | 5 +++-- .../include/xo/alloc2/gc/IGCObject_Any.hpp | 2 +- .../include/xo/alloc2/gc/IGCObject_Xfer.hpp | 4 ++-- xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp | 4 ++-- .../include/xo/alloc2/gc/RGCObjectVisitor.hpp | 20 +++++++++++++++++-- xo-alloc2/src/alloc2/IGCObject_Any.cpp | 2 +- .../include/xo/expression2/DApplyExpr.hpp | 5 ++--- .../include/xo/expression2/DConstant.hpp | 7 +++---- .../include/xo/expression2/DDefineExpr.hpp | 3 +-- .../include/xo/expression2/DGlobalSymtab.hpp | 4 ++-- .../include/xo/expression2/DIfElseExpr.hpp | 7 +++---- .../include/xo/expression2/DLambdaExpr.hpp | 4 ++-- .../include/xo/expression2/DLocalSymtab.hpp | 4 ++-- .../include/xo/expression2/DSequenceExpr.hpp | 5 ++--- .../include/xo/expression2/DTypename.hpp | 5 ++--- .../include/xo/expression2/DVarRef.hpp | 5 ++--- .../include/xo/expression2/DVariable.hpp | 5 ++--- .../define/IGCObject_DDefineExpr.hpp | 5 +++-- .../detail/IGCObject_DApplyExpr.hpp | 5 +++-- .../detail/IGCObject_DConstant.hpp | 5 +++-- .../detail/IGCObject_DIfElseExpr.hpp | 5 +++-- .../detail/IGCObject_DLambdaExpr.hpp | 5 +++-- .../detail/IGCObject_DSequenceExpr.hpp | 5 +++-- .../expression2/detail/IGCObject_DVarRef.hpp | 5 +++-- .../symtab/IGCObject_DGlobalSymtab.hpp | 5 +++-- .../symtab/IGCObject_DLocalSymtab.hpp | 5 +++-- .../typename/IGCObject_DTypename.hpp | 5 +++-- .../variable/IGCObject_DVariable.hpp | 5 +++-- xo-expression2/src/expression2/DApplyExpr.cpp | 7 +------ xo-expression2/src/expression2/DConstant.cpp | 8 +------- .../src/expression2/DDefineExpr.cpp | 8 +------- .../src/expression2/DGlobalSymtab.cpp | 2 +- .../src/expression2/DIfElseExpr.cpp | 8 +------- .../src/expression2/DLambdaExpr.cpp | 2 +- .../src/expression2/DLocalSymtab.cpp | 2 +- .../src/expression2/DSequenceExpr.cpp | 8 +------- xo-expression2/src/expression2/DTypename.cpp | 8 +------- xo-expression2/src/expression2/DVarRef.cpp | 8 +------- xo-expression2/src/expression2/DVariable.cpp | 8 +------- .../src/expression2/IGCObject_DApplyExpr.cpp | 4 ++-- .../src/expression2/IGCObject_DConstant.cpp | 4 ++-- .../src/expression2/IGCObject_DDefineExpr.cpp | 4 ++-- .../expression2/IGCObject_DGlobalSymtab.cpp | 4 ++-- .../src/expression2/IGCObject_DIfElseExpr.cpp | 4 ++-- .../src/expression2/IGCObject_DLambdaExpr.cpp | 4 ++-- .../expression2/IGCObject_DLocalSymtab.cpp | 4 ++-- .../expression2/IGCObject_DSequenceExpr.cpp | 4 ++-- .../src/expression2/IGCObject_DTypename.cpp | 4 ++-- .../src/expression2/IGCObject_DVarRef.cpp | 4 ++-- .../expression2/facet/IGCObject_DVariable.cpp | 4 ++-- xo-gc/src/gc/GCObjectStore.cpp | 2 +- xo-gc/src/gc/SetupGc.cpp | 3 +++ .../include/xo/interpreter2/DClosure.hpp | 4 ++-- .../include/xo/interpreter2/DLocalEnv.hpp | 4 ++-- .../xo/interpreter2/DVsmApplyClosureFrame.hpp | 2 +- .../xo/interpreter2/DVsmApplyFrame.hpp | 4 ++-- .../xo/interpreter2/DVsmDefContFrame.hpp | 4 ++-- .../xo/interpreter2/DVsmEvalArgsFrame.hpp | 4 ++-- .../xo/interpreter2/DVsmIfElseContFrame.hpp | 4 ++-- .../xo/interpreter2/DVsmSeqContFrame.hpp | 12 +++++------ .../define/IGCObject_DVsmDefContFrame.hpp | 5 +++-- .../detail/IGCObject_DClosure.hpp | 5 +++-- .../IGCObject_DVsmApplyClosureFrame.hpp | 5 +++-- .../detail/IGCObject_DVsmApplyFrame.hpp | 5 +++-- .../detail/IGCObject_DVsmEvalArgsFrame.hpp | 5 +++-- .../interpreter2/env/IGCObject_DLocalEnv.hpp | 5 +++-- .../ifelse/IGCObject_DVsmIfElseContFrame.hpp | 5 +++-- .../sequence/IGCObject_DVsmSeqContFrame.hpp | 5 +++-- .../vsm/DVirtualSchematikaMachine.hpp | 4 ++-- .../IGCObject_DVirtualSchematikaMachine.hpp | 5 +++-- xo-interpreter2/src/interpreter2/DClosure.cpp | 2 +- .../src/interpreter2/DLocalEnv.cpp | 2 +- .../DVirtualSchematikaMachine.cpp | 5 ++++- .../interpreter2/DVsmApplyClosureFrame.cpp | 2 +- .../src/interpreter2/DVsmApplyFrame.cpp | 2 +- .../src/interpreter2/DVsmDefContFrame.cpp | 2 +- .../src/interpreter2/DVsmEvalArgsFrame.cpp | 2 +- .../src/interpreter2/DVsmIfElseContFrame.cpp | 2 +- .../src/interpreter2/DVsmSeqContFrame.cpp | 4 ++-- .../src/interpreter2/IGCObject_DClosure.cpp | 4 ++-- .../IGCObject_DVsmApplyClosureFrame.cpp | 4 ++-- .../interpreter2/IGCObject_DVsmApplyFrame.cpp | 4 ++-- .../IGCObject_DVsmDefContFrame.cpp | 4 ++-- .../IGCObject_DVsmEvalArgsFrame.cpp | 4 ++-- .../IGCObject_DVsmIfElseContFrame.cpp | 4 ++-- .../IGCObject_DVsmSeqContFrame.cpp | 4 ++-- .../facet/IGCObject_DLocalEnv.cpp | 4 ++-- .../IGCObject_DVirtualSchematikaMachine.cpp | 4 ++-- xo-object2/include/xo/object2/DArray.hpp | 6 +++--- xo-object2/include/xo/object2/DBoolean.hpp | 6 +++--- xo-object2/include/xo/object2/DDictionary.hpp | 2 +- xo-object2/include/xo/object2/DFloat.hpp | 6 +++--- xo-object2/include/xo/object2/DInteger.hpp | 6 +++--- xo-object2/include/xo/object2/DList.hpp | 3 ++- .../include/xo/object2/DRuntimeError.hpp | 4 ++-- .../xo/object2/array/IGCObject_DArray.hpp | 5 +++-- .../xo/object2/boolean/IGCObject_DBoolean.hpp | 5 +++-- .../dictionary/IGCObject_DDictionary.hpp | 5 +++-- .../object2/error/IGCObject_DRuntimeError.hpp | 5 +++-- .../xo/object2/list/IGCObject_DList.hpp | 5 +++-- .../xo/object2/number/IGCObject_DFloat.hpp | 5 +++-- .../xo/object2/number/IGCObject_DInteger.hpp | 5 +++-- xo-object2/src/object2/DArray.cpp | 2 +- xo-object2/src/object2/DBoolean.cpp | 2 +- xo-object2/src/object2/DDictionary.cpp | 2 +- xo-object2/src/object2/DFloat.cpp | 2 +- xo-object2/src/object2/DInteger.cpp | 2 +- xo-object2/src/object2/DList.cpp | 2 +- xo-object2/src/object2/DRuntimeError.cpp | 2 +- xo-object2/src/object2/IGCObject_DArray.cpp | 4 ++-- xo-object2/src/object2/IGCObject_DBoolean.cpp | 4 ++-- .../src/object2/IGCObject_DDictionary.cpp | 4 ++-- xo-object2/src/object2/IGCObject_DFloat.cpp | 4 ++-- xo-object2/src/object2/IGCObject_DInteger.cpp | 4 ++-- xo-object2/src/object2/IGCObject_DList.cpp | 4 ++-- .../src/object2/IGCObject_DRuntimeError.cpp | 4 ++-- xo-procedure2/idl/Procedure.json5 | 2 +- xo-procedure2/idl/RuntimeContext.json5 | 1 + .../include/xo/procedure2/DPrimitive.hpp | 6 +++--- .../xo/procedure2/detail/ARuntimeContext.hpp | 1 + .../detail/IGCObject_DPrimitive_gco_0.hpp | 5 +++-- .../detail/IGCObject_DPrimitive_gco_1_gco.hpp | 5 +++-- ...IGCObject_DPrimitive_gco_2_dict_string.hpp | 5 +++-- .../IGCObject_DPrimitive_gco_2_gco_gco.hpp | 5 +++-- ...bject_DPrimitive_gco_3_dict_string_gco.hpp | 5 +++-- .../detail/IRuntimeContext_Xfer.hpp | 1 + .../facet/IGCObject_DPrimitive_gco_0.cpp | 4 ++-- .../facet/IGCObject_DPrimitive_gco_1_gco.cpp | 4 ++-- ...IGCObject_DPrimitive_gco_2_dict_string.cpp | 4 ++-- .../IGCObject_DPrimitive_gco_2_gco_gco.cpp | 4 ++-- ...bject_DPrimitive_gco_3_dict_string_gco.cpp | 4 ++-- xo-reader2/include/xo/reader2/DGlobalEnv.hpp | 4 ++-- .../xo/reader2/env/IGCObject_DGlobalEnv.hpp | 5 +++-- .../xo/reader2/parser/DSchematikaParser.hpp | 4 ++-- .../parser/IGCObject_DSchematikaParser.hpp | 5 +++-- xo-reader2/src/reader2/DGlobalEnv.cpp | 2 +- xo-reader2/src/reader2/DSchematikaParser.cpp | 2 +- .../reader2/facet/IGCObject_DGlobalEnv.cpp | 4 ++-- .../facet/IGCObject_DSchematikaParser.cpp | 4 ++-- .../include/xo/stringtable2/DString.hpp | 8 +++----- .../include/xo/stringtable2/DUniqueString.hpp | 2 +- .../stringtable2/string/IGCObject_DString.hpp | 5 +++-- .../uniquestring/IGCObject_DUniqueString.hpp | 5 +++-- xo-stringtable2/src/stringtable2/DString.cpp | 8 +------- .../src/stringtable2/DUniqueString.cpp | 2 +- .../src/stringtable2/IGCObject_DString.cpp | 4 ++-- .../stringtable2/IGCObject_DUniqueString.cpp | 4 ++-- xo-type/include/xo/type/DArrayType.hpp | 7 +++---- xo-type/include/xo/type/DAtomicType.hpp | 7 +++---- xo-type/include/xo/type/DFunctionType.hpp | 7 +++---- xo-type/include/xo/type/DListType.hpp | 7 +++---- .../xo/type/array/IGCObject_DArrayType.hpp | 5 +++-- .../xo/type/atomic/IGCObject_DAtomicType.hpp | 5 +++-- .../type/function/IGCObject_DFunctionType.hpp | 5 +++-- .../xo/type/list/IGCObject_DListType.hpp | 5 +++-- .../include/xo/type/typevar/DTypeVarRef.hpp | 7 +++---- .../xo/type/typevar/IGCObject_DTypeVarRef.hpp | 5 +++-- xo-type/src/type/DArrayType.cpp | 8 +------- xo-type/src/type/DAtomicType.cpp | 8 +------- xo-type/src/type/DFunctionType.cpp | 8 +------- xo-type/src/type/DListType.cpp | 8 +------- xo-type/src/type/DTypeVarRef.cpp | 8 +------- xo-type/src/type/IGCObject_DArrayType.cpp | 4 ++-- xo-type/src/type/IGCObject_DAtomicType.cpp | 4 ++-- xo-type/src/type/IGCObject_DFunctionType.cpp | 4 ++-- xo-type/src/type/IGCObject_DListType.cpp | 4 ++-- xo-type/src/type/IGCObject_DTypeVarRef.cpp | 4 ++-- 169 files changed, 391 insertions(+), 402 deletions(-) diff --git a/xo-alloc2/idl/GCObject.json5 b/xo-alloc2/idl/GCObject.json5 index fc63bf5c..f86e6ca9 100644 --- a/xo-alloc2/idl/GCObject.json5 +++ b/xo-alloc2/idl/GCObject.json5 @@ -64,11 +64,14 @@ nonconst_methods: [ // Opaque shallow_move(obj) noexcept { - name: "shallow_move", - doc: ["move instance using collector"], + name: "gco_shallow_move", + doc: [ + "move instance using object visitor.", + "Arguably abusing the word 'visitor' here", + ], return_type: "Opaque", args:[ - {type: "obj", name: "gc"}, + {type: "obj", name: "gc"}, ], const: true, noexcept: true, diff --git a/xo-alloc2/idl/GCObjectVisitor.json5 b/xo-alloc2/idl/GCObjectVisitor.json5 index 93072195..efe14a7f 100644 --- a/xo-alloc2/idl/GCObjectVisitor.json5 +++ b/xo-alloc2/idl/GCObjectVisitor.json5 @@ -88,9 +88,25 @@ }, ], router_facet_explicit_content: [ + "/** convenience: allocate copy for typed pointer **/", + "template ", + "void * alloc_copy_for(const T * src) noexcept {", + " return O::iface()->alloc_copy(O::data(), (std::byte *)const_cast(src));", + "}", "", - "/** visit forward faceted object child pointer in place.", - " Defined in RGCObject.hpp to avoid #include cycle", + "/** convenience: move typed pointer **/", + "template ", + "T * std_move_for(T * src) noexcept {", + " void * mem = this->alloc_copy_for(src);", + " if (mem) {", + " return new (mem) T(std::move(*src));", + " }", + " return nullptr;", + "}", + "", + "/** visit a gcobject child pointer in place.", + " Defined in RCollector_aux.hpp to avoid #include cycle", + " (for historical reasons - coul d be in RGCObject_aux.hpp?)", " **/", "template ", "void visit_child(xo::facet::obj * p_obj);", diff --git a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp index 098d0c5d..6ed3ee77 100644 --- a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp @@ -67,8 +67,9 @@ public: virtual void _drop(Opaque d) const noexcept = 0; // nonconst methods - /** move instance using collector **/ - virtual Opaque shallow_move(Opaque data, obj gc) const noexcept = 0; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + virtual Opaque gco_shallow_move(Opaque data, obj gc) const noexcept = 0; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp index 7f12f823..62974779 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp @@ -64,7 +64,7 @@ namespace mm { // const methods // nonconst methods - [[noreturn]] Opaque shallow_move(Opaque, obj) const noexcept override; + [[noreturn]] Opaque gco_shallow_move(Opaque, obj) const noexcept override; [[noreturn]] void visit_gco_children(Opaque, obj) const noexcept override; ///@} diff --git a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp index 361bc517..633c1030 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp @@ -53,8 +53,8 @@ namespace mm { // const methods // non-const methods - Opaque shallow_move(Opaque data, obj gc) const noexcept override { - return I::shallow_move(_dcast(data), gc); + Opaque gco_shallow_move(Opaque data, obj gc) const noexcept override { + return I::gco_shallow_move(_dcast(data), gc); } void visit_gco_children(Opaque data, obj fn) const noexcept override { return I::visit_gco_children(_dcast(data), fn); diff --git a/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp index 5ac4c487..1d625590 100644 --- a/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp @@ -58,8 +58,8 @@ public: // const methods // non-const methods (still const in router!) - Opaque shallow_move(obj gc) noexcept { - return O::iface()->shallow_move(O::data(), gc); + Opaque gco_shallow_move(obj gc) noexcept { + return O::iface()->gco_shallow_move(O::data(), gc); } void visit_gco_children(obj fn) noexcept { return O::iface()->visit_gco_children(O::data(), fn); diff --git a/xo-alloc2/include/xo/alloc2/gc/RGCObjectVisitor.hpp b/xo-alloc2/include/xo/alloc2/gc/RGCObjectVisitor.hpp index b0f2f5be..0b120a83 100644 --- a/xo-alloc2/include/xo/alloc2/gc/RGCObjectVisitor.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/RGCObjectVisitor.hpp @@ -46,9 +46,25 @@ public: ///@{ // explicit injected content + /** convenience: allocate copy for typed pointer **/ + template + void * alloc_copy_for(const T * src) noexcept { + return O::iface()->alloc_copy(O::data(), (std::byte *)const_cast(src)); + } - /** visit forward faceted object child pointer in place. - Defined in RGCObject.hpp to avoid #include cycle + /** convenience: move typed pointer **/ + template + T * std_move_for(T * src) noexcept { + void * mem = this->alloc_copy_for(src); + if (mem) { + return new (mem) T(std::move(*src)); + } + return nullptr; + } + + /** visit a gcobject child pointer in place. + Defined in RCollector_aux.hpp to avoid #include cycle + (for historical reasons - coul d be in RGCObject_aux.hpp?) **/ template void visit_child(xo::facet::obj * p_obj); diff --git a/xo-alloc2/src/alloc2/IGCObject_Any.cpp b/xo-alloc2/src/alloc2/IGCObject_Any.cpp index 7df05480..914123de 100644 --- a/xo-alloc2/src/alloc2/IGCObject_Any.cpp +++ b/xo-alloc2/src/alloc2/IGCObject_Any.cpp @@ -36,7 +36,7 @@ IGCObject_Any::_valid // nonconst methods auto -IGCObject_Any::shallow_move(Opaque, obj) const noexcept -> Opaque +IGCObject_Any::gco_shallow_move(Opaque, obj) const noexcept -> Opaque { _fatal(); } diff --git a/xo-expression2/include/xo/expression2/DApplyExpr.hpp b/xo-expression2/include/xo/expression2/DApplyExpr.hpp index 0042d561..bc5cdc47 100644 --- a/xo-expression2/include/xo/expression2/DApplyExpr.hpp +++ b/xo-expression2/include/xo/expression2/DApplyExpr.hpp @@ -21,7 +21,7 @@ namespace xo { **/ class DApplyExpr { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -84,8 +84,7 @@ namespace xo { /** @defgroup scm-applyexpr-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DApplyExpr * shallow_move(obj gc) noexcept; + DApplyExpr * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DConstant.hpp b/xo-expression2/include/xo/expression2/DConstant.hpp index 2c878ea9..e81a7b2d 100644 --- a/xo-expression2/include/xo/expression2/DConstant.hpp +++ b/xo-expression2/include/xo/expression2/DConstant.hpp @@ -8,7 +8,7 @@ #include "Expression.hpp" #include "TypeRef.hpp" #include "exprtype.hpp" -#include +//#include #include #include #include @@ -22,7 +22,7 @@ namespace xo { public: using TaggedPtr = xo::reflect::TaggedPtr; using TypeDescr = xo::reflect::TypeDescr; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -64,8 +64,7 @@ namespace xo { /** @defgroup scm-constant-gcobject-facet **/ ///@{ - size_t shallow_size() const noexcept; - DConstant * shallow_move(obj gc) noexcept; + DConstant * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DDefineExpr.hpp b/xo-expression2/include/xo/expression2/DDefineExpr.hpp index f1528531..474a4122 100644 --- a/xo-expression2/include/xo/expression2/DDefineExpr.hpp +++ b/xo-expression2/include/xo/expression2/DDefineExpr.hpp @@ -74,8 +74,7 @@ namespace xo { /** @defgroup scm-defineexpr-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DDefineExpr * shallow_move(obj gc) noexcept; + DDefineExpr * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp b/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp index a24c0bdc..b3840a69 100644 --- a/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp @@ -30,7 +30,7 @@ namespace xo { using value_type = Binding; using ArenaHashMapConfig = xo::map::ArenaHashMapConfig; using repr_type = xo::map::DArenaHashMap; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -115,7 +115,7 @@ namespace xo { /** @defgroup scm-globalsymtab-gcobject-facet gcobject facet **/ ///@{ - DGlobalSymtab * shallow_move(obj gc) noexcept; + DGlobalSymtab * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DIfElseExpr.hpp b/xo-expression2/include/xo/expression2/DIfElseExpr.hpp index b27c9ade..04a354dd 100644 --- a/xo-expression2/include/xo/expression2/DIfElseExpr.hpp +++ b/xo-expression2/include/xo/expression2/DIfElseExpr.hpp @@ -8,7 +8,7 @@ #include "Expression.hpp" #include "TypeRef.hpp" #include "exprtype.hpp" -#include +//#include #include #include #include @@ -21,7 +21,7 @@ namespace xo { **/ class DIfElseExpr { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -98,8 +98,7 @@ namespace xo { /** @defgroup scm-ifelseexpr-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DIfElseExpr * shallow_move(obj gc) noexcept; + DIfElseExpr * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DLambdaExpr.hpp b/xo-expression2/include/xo/expression2/DLambdaExpr.hpp index 2a507497..e4b0296d 100644 --- a/xo-expression2/include/xo/expression2/DLambdaExpr.hpp +++ b/xo-expression2/include/xo/expression2/DLambdaExpr.hpp @@ -21,7 +21,7 @@ namespace xo { **/ class DLambdaExpr { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -87,7 +87,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DLambdaExpr * shallow_move(obj gc) noexcept; + DLambdaExpr * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DLocalSymtab.hpp b/xo-expression2/include/xo/expression2/DLocalSymtab.hpp index f389c3ea..081742b0 100644 --- a/xo-expression2/include/xo/expression2/DLocalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/DLocalSymtab.hpp @@ -20,7 +20,7 @@ namespace xo { public: using DArray = xo::scm::DArray; using ppindentinfo = xo::print::ppindentinfo; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -99,7 +99,7 @@ namespace xo { /** @defgroup xo-localsymtab-gcobject-facet gcobject facet **/ ///@{ - DLocalSymtab * shallow_move(obj gc) noexcept; + DLocalSymtab * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DSequenceExpr.hpp b/xo-expression2/include/xo/expression2/DSequenceExpr.hpp index 76a8bec0..4a103e0e 100644 --- a/xo-expression2/include/xo/expression2/DSequenceExpr.hpp +++ b/xo-expression2/include/xo/expression2/DSequenceExpr.hpp @@ -23,7 +23,7 @@ namespace xo { **/ class DSequenceExpr { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -74,8 +74,7 @@ namespace xo { /** @defgroup scm-sequenceexpr-gcobject-facet gcobject facet methods **/ ///@{ - std::size_t shallow_size() const noexcept; - DSequenceExpr * shallow_move(obj gc) noexcept; + DSequenceExpr * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DTypename.hpp b/xo-expression2/include/xo/expression2/DTypename.hpp index 2e35c9e3..7ddacd21 100644 --- a/xo-expression2/include/xo/expression2/DTypename.hpp +++ b/xo-expression2/include/xo/expression2/DTypename.hpp @@ -24,7 +24,7 @@ namespace xo { class DTypename { public: using ppindentinfo = xo::print::ppindentinfo; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AGCObject = xo::mm::AGCObject; using AAllocator = xo::mm::AAllocator; @@ -55,8 +55,7 @@ namespace xo { /** @defgroup scm-typename-gcobject-facet **/ ///@{ - size_t shallow_size() const noexcept; - DTypename * shallow_move(obj gc) noexcept; + DTypename * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DVarRef.hpp b/xo-expression2/include/xo/expression2/DVarRef.hpp index db85d558..002e511a 100644 --- a/xo-expression2/include/xo/expression2/DVarRef.hpp +++ b/xo-expression2/include/xo/expression2/DVarRef.hpp @@ -21,7 +21,7 @@ namespace xo { class DVarRef { public: using ppindentinfo = xo::print::ppindentinfo; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -56,8 +56,7 @@ namespace xo { /** @defgroup scm-variable-gcobject-facet **/ ///@{ - size_t shallow_size() const noexcept; - DVarRef * shallow_move(obj gc) noexcept; + DVarRef * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DVariable.hpp b/xo-expression2/include/xo/expression2/DVariable.hpp index 2e74fbcc..5813ae1b 100644 --- a/xo-expression2/include/xo/expression2/DVariable.hpp +++ b/xo-expression2/include/xo/expression2/DVariable.hpp @@ -22,7 +22,7 @@ namespace xo { class DVariable { public: using ppindentinfo = xo::print::ppindentinfo; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -64,8 +64,7 @@ namespace xo { /** @defgroup scm-variable-gcobject-facet **/ ///@{ - size_t shallow_size() const noexcept; - DVariable * shallow_move(obj gc) noexcept; + DVariable * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp b/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp index 8cb5fe13..6a233f92 100644 --- a/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp +++ b/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DDefineExpr & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DDefineExpr & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp index 068f9b12..399d9398 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DApplyExpr & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DApplyExpr & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp index a909f00f..b2e624be 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DConstant & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DConstant & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp index ca0d078a..80a49f22 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DIfElseExpr & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DIfElseExpr & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp index bd13504d..5decc2a0 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DLambdaExpr & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DLambdaExpr & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp index 2801853a..54bab050 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DSequenceExpr & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DSequenceExpr & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp index 74693209..98c65aab 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVarRef & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVarRef & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp index a1aebbc4..334c0ea9 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DGlobalSymtab & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DGlobalSymtab & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp b/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp index 61d159b2..c7890a79 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DLocalSymtab & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DLocalSymtab & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp b/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp index fbf46356..e8946864 100644 --- a/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp +++ b/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DTypename & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DTypename & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp b/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp index 1bf0b86c..3a31f155 100644 --- a/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp +++ b/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVariable & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVariable & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-expression2/src/expression2/DApplyExpr.cpp b/xo-expression2/src/expression2/DApplyExpr.cpp index 18b9b60a..2776b438 100644 --- a/xo-expression2/src/expression2/DApplyExpr.cpp +++ b/xo-expression2/src/expression2/DApplyExpr.cpp @@ -104,13 +104,8 @@ namespace xo { // ----- gcobject facet ----- - std::size_t - DApplyExpr::shallow_size() const noexcept { - return sizeof(DApplyExpr) + (n_args_ * sizeof(obj)); - } - DApplyExpr * - DApplyExpr::shallow_move(obj gc) noexcept { + DApplyExpr::gco_shallow_move(obj gc) noexcept { // note: not using ACollector.std_copy_for() here, // flexible array -> not move-constructible diff --git a/xo-expression2/src/expression2/DConstant.cpp b/xo-expression2/src/expression2/DConstant.cpp index bbf86183..19805cb5 100644 --- a/xo-expression2/src/expression2/DConstant.cpp +++ b/xo-expression2/src/expression2/DConstant.cpp @@ -71,14 +71,8 @@ namespace xo { return nullptr; } - std::size_t - DConstant::shallow_size() const noexcept - { - return sizeof(DConstant); - } - DConstant * - DConstant::shallow_move(obj gc) noexcept + DConstant::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DDefineExpr.cpp b/xo-expression2/src/expression2/DDefineExpr.cpp index 69ce84e0..ba481805 100644 --- a/xo-expression2/src/expression2/DDefineExpr.cpp +++ b/xo-expression2/src/expression2/DDefineExpr.cpp @@ -78,14 +78,8 @@ namespace xo { // ----- GCObject facet ----- - std::size_t - DDefineExpr::shallow_size() const noexcept - { - return sizeof(*this); - } - DDefineExpr * - DDefineExpr::shallow_move(obj gc) noexcept + DDefineExpr::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DGlobalSymtab.cpp b/xo-expression2/src/expression2/DGlobalSymtab.cpp index 10f65ea2..f5df4a4c 100644 --- a/xo-expression2/src/expression2/DGlobalSymtab.cpp +++ b/xo-expression2/src/expression2/DGlobalSymtab.cpp @@ -263,7 +263,7 @@ namespace xo { // ----- gcobject facet ----- DGlobalSymtab * - DGlobalSymtab::shallow_move(obj gc) noexcept + DGlobalSymtab::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DIfElseExpr.cpp b/xo-expression2/src/expression2/DIfElseExpr.cpp index c44a7ebd..b8758387 100644 --- a/xo-expression2/src/expression2/DIfElseExpr.cpp +++ b/xo-expression2/src/expression2/DIfElseExpr.cpp @@ -82,14 +82,8 @@ namespace xo { // GCObject facet - std::size_t - DIfElseExpr::shallow_size() const noexcept - { - return sizeof(DIfElseExpr); - } - DIfElseExpr * - DIfElseExpr::shallow_move(obj gc) noexcept + DIfElseExpr::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DLambdaExpr.cpp b/xo-expression2/src/expression2/DLambdaExpr.cpp index 349ccd99..c73ccc8a 100644 --- a/xo-expression2/src/expression2/DLambdaExpr.cpp +++ b/xo-expression2/src/expression2/DLambdaExpr.cpp @@ -141,7 +141,7 @@ namespace xo { } DLambdaExpr * - DLambdaExpr::shallow_move(obj gc) noexcept { + DLambdaExpr::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DLocalSymtab.cpp b/xo-expression2/src/expression2/DLocalSymtab.cpp index 017fb1d7..1fa1afd8 100644 --- a/xo-expression2/src/expression2/DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/DLocalSymtab.cpp @@ -113,7 +113,7 @@ namespace xo { // ----- gcobject facet ----- DLocalSymtab * - DLocalSymtab::shallow_move(obj gc) noexcept + DLocalSymtab::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DSequenceExpr.cpp b/xo-expression2/src/expression2/DSequenceExpr.cpp index 2dc153f0..a180a5fb 100644 --- a/xo-expression2/src/expression2/DSequenceExpr.cpp +++ b/xo-expression2/src/expression2/DSequenceExpr.cpp @@ -113,14 +113,8 @@ namespace xo { // gc hooks for IGCObject_DSequenceExpr - std::size_t - DSequenceExpr::shallow_size() const noexcept - { - return sizeof(DSequenceExpr); - } - DSequenceExpr * - DSequenceExpr::shallow_move(obj gc) noexcept + DSequenceExpr::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DTypename.cpp b/xo-expression2/src/expression2/DTypename.cpp index 15e7dbdb..da73f28f 100644 --- a/xo-expression2/src/expression2/DTypename.cpp +++ b/xo-expression2/src/expression2/DTypename.cpp @@ -40,14 +40,8 @@ namespace xo { : name_{name}, type_{type} {} - size_t - DTypename::shallow_size() const noexcept - { - return sizeof(DTypename); - } - DTypename * - DTypename::shallow_move(obj gc) noexcept + DTypename::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DVarRef.cpp b/xo-expression2/src/expression2/DVarRef.cpp index 6cdea4e5..57a39153 100644 --- a/xo-expression2/src/expression2/DVarRef.cpp +++ b/xo-expression2/src/expression2/DVarRef.cpp @@ -58,14 +58,8 @@ namespace xo { // gcobject facet - std::size_t - DVarRef::shallow_size() const noexcept - { - return sizeof(DVarRef); - } - DVarRef * - DVarRef::shallow_move(obj gc) noexcept + DVarRef::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/DVariable.cpp b/xo-expression2/src/expression2/DVariable.cpp index 9ab2f8bd..209764cd 100644 --- a/xo-expression2/src/expression2/DVariable.cpp +++ b/xo-expression2/src/expression2/DVariable.cpp @@ -38,14 +38,8 @@ namespace xo { typeref_.resolve(td); } - size_t - DVariable::shallow_size() const noexcept - { - return sizeof(DVariable); - } - DVariable * - DVariable::shallow_move(obj gc) noexcept + DVariable::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp index 9b5fc735..d2574d64 100644 --- a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DApplyExpr::shallow_move(DApplyExpr & self, obj gc) noexcept -> Opaque + IGCObject_DApplyExpr::gco_shallow_move(DApplyExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DApplyExpr::visit_gco_children(DApplyExpr & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DConstant.cpp b/xo-expression2/src/expression2/IGCObject_DConstant.cpp index 3e350102..be6f583d 100644 --- a/xo-expression2/src/expression2/IGCObject_DConstant.cpp +++ b/xo-expression2/src/expression2/IGCObject_DConstant.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DConstant::shallow_move(DConstant & self, obj gc) noexcept -> Opaque + IGCObject_DConstant::gco_shallow_move(DConstant & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DConstant::visit_gco_children(DConstant & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp b/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp index 34c59e93..f2ea0747 100644 --- a/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DDefineExpr::shallow_move(DDefineExpr & self, obj gc) noexcept -> Opaque + IGCObject_DDefineExpr::gco_shallow_move(DDefineExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DDefineExpr::visit_gco_children(DDefineExpr & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp b/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp index 1e78de47..3070a26c 100644 --- a/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DGlobalSymtab::shallow_move(DGlobalSymtab & self, obj gc) noexcept -> Opaque + IGCObject_DGlobalSymtab::gco_shallow_move(DGlobalSymtab & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DGlobalSymtab::visit_gco_children(DGlobalSymtab & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp b/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp index 0db6f160..6f788e03 100644 --- a/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DIfElseExpr::shallow_move(DIfElseExpr & self, obj gc) noexcept -> Opaque + IGCObject_DIfElseExpr::gco_shallow_move(DIfElseExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DIfElseExpr::visit_gco_children(DIfElseExpr & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp b/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp index a9ad37aa..b4706c56 100644 --- a/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DLambdaExpr::shallow_move(DLambdaExpr & self, obj gc) noexcept -> Opaque + IGCObject_DLambdaExpr::gco_shallow_move(DLambdaExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DLambdaExpr::visit_gco_children(DLambdaExpr & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp b/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp index 7384e17a..5e37d826 100644 --- a/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DLocalSymtab::shallow_move(DLocalSymtab & self, obj gc) noexcept -> Opaque + IGCObject_DLocalSymtab::gco_shallow_move(DLocalSymtab & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DLocalSymtab::visit_gco_children(DLocalSymtab & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp b/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp index 8660f506..1f92c2e2 100644 --- a/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DSequenceExpr::shallow_move(DSequenceExpr & self, obj gc) noexcept -> Opaque + IGCObject_DSequenceExpr::gco_shallow_move(DSequenceExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DSequenceExpr::visit_gco_children(DSequenceExpr & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DTypename.cpp b/xo-expression2/src/expression2/IGCObject_DTypename.cpp index 478b2005..ca21870a 100644 --- a/xo-expression2/src/expression2/IGCObject_DTypename.cpp +++ b/xo-expression2/src/expression2/IGCObject_DTypename.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DTypename::shallow_move(DTypename & self, obj gc) noexcept -> Opaque + IGCObject_DTypename::gco_shallow_move(DTypename & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DTypename::visit_gco_children(DTypename & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/IGCObject_DVarRef.cpp b/xo-expression2/src/expression2/IGCObject_DVarRef.cpp index 7035db1e..68d6e1d2 100644 --- a/xo-expression2/src/expression2/IGCObject_DVarRef.cpp +++ b/xo-expression2/src/expression2/IGCObject_DVarRef.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVarRef::shallow_move(DVarRef & self, obj gc) noexcept -> Opaque + IGCObject_DVarRef::gco_shallow_move(DVarRef & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVarRef::visit_gco_children(DVarRef & self, obj fn) noexcept -> void diff --git a/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp b/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp index a6370f56..0a91bfb2 100644 --- a/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp +++ b/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVariable::shallow_move(DVariable & self, obj gc) noexcept -> Opaque + IGCObject_DVariable::gco_shallow_move(DVariable & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVariable::visit_gco_children(DVariable & self, obj fn) noexcept -> void diff --git a/xo-gc/src/gc/GCObjectStore.cpp b/xo-gc/src/gc/GCObjectStore.cpp index 33d2d240..a3070afb 100644 --- a/xo-gc/src/gc/GCObjectStore.cpp +++ b/xo-gc/src/gc/GCObjectStore.cpp @@ -870,7 +870,7 @@ namespace xo { //obj gc_gco(gc); - void * to_dest = iface->shallow_move(from_src, x1gc->ref()); + void * to_dest = iface->gco_shallow_move(from_src, x1gc->ref()); log && log(xtag("from_src", from_src), xtag("to_dest", to_dest)); log && log(xtag("tseq", info.tseq()), diff --git a/xo-gc/src/gc/SetupGc.cpp b/xo-gc/src/gc/SetupGc.cpp index f99ea4e6..fa0ea721 100644 --- a/xo-gc/src/gc/SetupGc.cpp +++ b/xo-gc/src/gc/SetupGc.cpp @@ -24,9 +24,12 @@ namespace xo { FacetRegistry::register_impl(); FacetRegistry::register_impl(); + FacetRegistry::register_impl(); log && log(xtag("DX1Collector.tseq", typeseq::id())); + log && log(xtag("ACollector.tseq", typeseq::id())); + log && log(xtag("AGCObjectVisitor.tseq", typeseq::id())); return true; } diff --git a/xo-interpreter2/include/xo/interpreter2/DClosure.hpp b/xo-interpreter2/include/xo/interpreter2/DClosure.hpp index 4d24d72e..8472cfc5 100644 --- a/xo-interpreter2/include/xo/interpreter2/DClosure.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DClosure.hpp @@ -19,7 +19,7 @@ namespace xo { class DClosure { public: using ARuntimeContext = xo::scm::ARuntimeContext; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -58,7 +58,7 @@ namespace xo { /** @defgroup scm-closure-gcobject-facet **/ ///@{ - DClosure * shallow_move(obj gc) noexcept; + DClosure * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp index 5270dec1..e60727b0 100644 --- a/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp @@ -16,7 +16,7 @@ namespace xo { class DLocalEnv { public: using DArray = xo::scm::DArray; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -55,7 +55,7 @@ namespace xo { /** @defgroup scm-localenv-gcobject-facet **/ ///@{ - DLocalEnv * shallow_move(obj gc) noexcept; + DLocalEnv * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp index 8dd30efb..66cbf81a 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp @@ -41,7 +41,7 @@ namespace xo { /** gcobject facet **/ std::size_t shallow_size() const noexcept; - DVsmApplyClosureFrame * shallow_move(obj gc) noexcept; + DVsmApplyClosureFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; /** pretty-printing support **/ diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp index d8e9ab79..60a572aa 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp @@ -14,7 +14,7 @@ namespace xo { class DVsmApplyFrame { public: using AProcedure = xo::scm::AProcedure; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -38,7 +38,7 @@ namespace xo { void assign_fn(obj x) { this->fn_ = x; } - DVsmApplyFrame * shallow_move(obj gc) noexcept; + DVsmApplyFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; /** pretty-printing support **/ diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp index acdd8a90..79a9227c 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp @@ -15,7 +15,7 @@ namespace xo { **/ class DVsmDefContFrame { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using AGCObject = xo::mm::AGCObject; @@ -51,7 +51,7 @@ namespace xo { /** @defgroup scm-vsmdefcontframe-gcobject-facet gcobject facet **/ ///@{ - DVsmDefContFrame * shallow_move(obj gc) noexcept; + DVsmDefContFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp index ab7a4607..34d74b9a 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp @@ -14,7 +14,7 @@ namespace xo { /** frame for executing an apply expression **/ class DVsmEvalArgsFrame { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -43,7 +43,7 @@ namespace xo { int32_t increment_arg() { return ++i_arg_; } - DVsmEvalArgsFrame * shallow_move(obj gc) noexcept; + DVsmEvalArgsFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; bool pretty(const ppindentinfo & ppii) const; diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp index 82c5ee31..4d3176dc 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp @@ -15,7 +15,7 @@ namespace xo { **/ class DVsmIfElseContFrame { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AGCObject = xo::mm::AGCObject; using AAllocator = xo::mm::AAllocator; @@ -51,7 +51,7 @@ namespace xo { /** @defgroup scm-vsmevalsequenceframe-gcobject-facet gcobject facet **/ ///@{ - DVsmIfElseContFrame * shallow_move(obj gc) noexcept; + DVsmIfElseContFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp index 65532996..6b141cc6 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp @@ -15,7 +15,7 @@ namespace xo { **/ class DVsmSeqContFrame { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AAllocator = xo::mm::AAllocator; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; @@ -32,10 +32,10 @@ namespace xo { /** create instance using memory from allocator @p mm **/ static DVsmSeqContFrame * make(obj mm, - obj parent, - VsmInstr cont, - DSequenceExpr * seq_expr, - uint32_t i_seq); + obj parent, + VsmInstr cont, + DSequenceExpr * seq_expr, + uint32_t i_seq); ///@} /** @defgroup scm-vsmevalsequenceframe-access-methods access methods **/ @@ -56,7 +56,7 @@ namespace xo { /** @defgroup scm-vsmevalsequenceframe-gcobject-facet gcobject facet **/ ///@{ - DVsmSeqContFrame * shallow_move(obj gc) noexcept; + DVsmSeqContFrame * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp index 8c95cf65..215515ac 100644 --- a/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmDefContFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmDefContFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp index a875406f..6e6058dd 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DClosure & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DClosure & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp index ec79f34e..9a021127 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp index da5dc97d..2936f81e 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmApplyFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmApplyFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp index d0faa515..15a09267 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp index cb5bdc49..29484934 100644 --- a/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DLocalEnv & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DLocalEnv & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp index 1fc589f7..6812b6a0 100644 --- a/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp index c8e20628..9b299d82 100644 --- a/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVsmSeqContFrame & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVsmSeqContFrame & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp b/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp index 28343528..1b386aaa 100644 --- a/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp +++ b/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp @@ -71,7 +71,7 @@ namespace xo { public: // will be DArenaVector> probably using Stack = void *; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -154,7 +154,7 @@ namespace xo { /** shallow copy during gc cycle. Not implemented! Only intending to support * VSM as virtual root **/ - DVirtualSchematikaMachine * shallow_move(obj gc) noexcept; + DVirtualSchematikaMachine * gco_shallow_move(obj gc) noexcept; /** forward gc-aware child pointers **/ diff --git a/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp b/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp index 55497fad..c7d1d1f7 100644 --- a/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp +++ b/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-interpreter2/src/interpreter2/DClosure.cpp b/xo-interpreter2/src/interpreter2/DClosure.cpp index ea8bcb15..684eb5d0 100644 --- a/xo-interpreter2/src/interpreter2/DClosure.cpp +++ b/xo-interpreter2/src/interpreter2/DClosure.cpp @@ -65,7 +65,7 @@ namespace xo { } DClosure * - DClosure::shallow_move(obj gc) noexcept { + DClosure::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DLocalEnv.cpp b/xo-interpreter2/src/interpreter2/DLocalEnv.cpp index 3da6fd9b..e0fe0e79 100644 --- a/xo-interpreter2/src/interpreter2/DLocalEnv.cpp +++ b/xo-interpreter2/src/interpreter2/DLocalEnv.cpp @@ -92,7 +92,7 @@ namespace xo { } DLocalEnv * - DLocalEnv::shallow_move(obj gc) noexcept { + DLocalEnv::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp b/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp index 8f9d3967..01c56698 100644 --- a/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp +++ b/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp @@ -954,8 +954,11 @@ namespace xo { } DVirtualSchematikaMachine * - DVirtualSchematikaMachine::shallow_move(obj gc) noexcept + DVirtualSchematikaMachine::gco_shallow_move(obj gc) noexcept { + // need move-ctor on abox<..> + //return gc.std_move_for(this); + (void)gc; /** TODO: should be able to use gc.std_move_for(this) now diff --git a/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp index c17414b8..dbb1601c 100644 --- a/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp @@ -33,7 +33,7 @@ namespace xo { } DVsmApplyClosureFrame * - DVsmApplyClosureFrame::shallow_move(obj gc) noexcept + DVsmApplyClosureFrame::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp index 1a9a946d..19db4bdf 100644 --- a/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp @@ -41,7 +41,7 @@ namespace xo { } DVsmApplyFrame * - DVsmApplyFrame::shallow_move(obj gc) noexcept + DVsmApplyFrame::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp index 0014f1a3..97b12ab0 100644 --- a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp @@ -32,7 +32,7 @@ namespace xo { // gcobject facet DVsmDefContFrame * - DVsmDefContFrame::shallow_move(obj gc) noexcept + DVsmDefContFrame::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp index b796bb78..42d44de5 100644 --- a/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp @@ -42,7 +42,7 @@ namespace xo { } DVsmEvalArgsFrame * - DVsmEvalArgsFrame::shallow_move(obj gc) noexcept + DVsmEvalArgsFrame::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp index d0edd976..a82206bc 100644 --- a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp @@ -30,7 +30,7 @@ namespace xo { // gcobject facet DVsmIfElseContFrame * - DVsmIfElseContFrame::shallow_move(obj gc) noexcept + DVsmIfElseContFrame::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp index f9ef2f0b..cb031b18 100644 --- a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp @@ -33,9 +33,9 @@ namespace xo { // gcobject facet DVsmSeqContFrame * - DVsmSeqContFrame::shallow_move(obj gc) noexcept + DVsmSeqContFrame::gco_shallow_move(obj gc) noexcept { - return gc.std_move_for(this); + return gc.std_move_for(this); } void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp index 889567bc..be0c9903 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DClosure::shallow_move(DClosure & self, obj gc) noexcept -> Opaque + IGCObject_DClosure::gco_shallow_move(DClosure & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DClosure::visit_gco_children(DClosure & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp index be67179b..5fcb724a 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmApplyClosureFrame::shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmApplyClosureFrame::gco_shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp index d3078821..4e8adef7 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmApplyFrame::shallow_move(DVsmApplyFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmApplyFrame::gco_shallow_move(DVsmApplyFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp index b3de6d94..60cb90d0 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmDefContFrame::shallow_move(DVsmDefContFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmDefContFrame::gco_shallow_move(DVsmDefContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp index edf1768b..c9697c90 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmEvalArgsFrame::shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmEvalArgsFrame::gco_shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp index 6f73f5a8..d8fa856d 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmIfElseContFrame::shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmIfElseContFrame::gco_shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp index 437ac776..aa004bce 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVsmSeqContFrame::shallow_move(DVsmSeqContFrame & self, obj gc) noexcept -> Opaque + IGCObject_DVsmSeqContFrame::gco_shallow_move(DVsmSeqContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp b/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp index 2b8e4e93..eb107a81 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DLocalEnv::shallow_move(DLocalEnv & self, obj gc) noexcept -> Opaque + IGCObject_DLocalEnv::gco_shallow_move(DLocalEnv & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, obj fn) noexcept -> void diff --git a/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp b/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp index 7fa74f97..c894ec35 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DVirtualSchematikaMachine::shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept -> Opaque + IGCObject_DVirtualSchematikaMachine::gco_shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, obj fn) noexcept -> void diff --git a/xo-object2/include/xo/object2/DArray.hpp b/xo-object2/include/xo/object2/DArray.hpp index 71c7f444..cd2bab29 100644 --- a/xo-object2/include/xo/object2/DArray.hpp +++ b/xo-object2/include/xo/object2/DArray.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +//#include #include #include #include @@ -33,7 +33,7 @@ namespace xo { /** xo allocator facet **/ using AAllocator = xo::mm::AAllocator; /** garbage collector facet **/ - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; /** gc-aware object facet **/ using AGCObject = xo::mm::AGCObject; /** gc-centric object visitor **/ @@ -148,7 +148,7 @@ namespace xo { /** @defgroup darray-gcobject-methods **/ ///@{ /** move to new address, mandated by @p gc **/ - DArray * shallow_move(obj gc) noexcept; + DArray * gco_shallow_move(obj gc) noexcept; /** forward elements to @p gc to-space; replace originals with forarding pointers **/ void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DBoolean.hpp b/xo-object2/include/xo/object2/DBoolean.hpp index 1637bc74..53ee4b88 100644 --- a/xo-object2/include/xo/object2/DBoolean.hpp +++ b/xo-object2/include/xo/object2/DBoolean.hpp @@ -5,7 +5,7 @@ #pragma once -#include +//#include #include #include #include @@ -16,7 +16,7 @@ namespace xo { namespace scm { struct DBoolean { using AAllocator = xo::mm::AAllocator; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AGCObject = xo::mm::AGCObject; using ppindentinfo = xo::print::ppindentinfo; @@ -39,7 +39,7 @@ namespace xo { // GCObject facet - DBoolean * shallow_move(obj gc) noexcept; + DBoolean * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DDictionary.hpp b/xo-object2/include/xo/object2/DDictionary.hpp index 9ab75be0..cda1d6f7 100644 --- a/xo-object2/include/xo/object2/DDictionary.hpp +++ b/xo-object2/include/xo/object2/DDictionary.hpp @@ -204,7 +204,7 @@ namespace xo { /** @defgroup ddictionary-gcobject-methods **/ ///@{ /** return shallow copy of this array, using memory from @p mm **/ - DDictionary * shallow_move(obj gc) noexcept; + DDictionary * gco_shallow_move(obj gc) noexcept; /** forward elements to @p gc to-space; replace originals with forwarding pointers **/ void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DFloat.hpp b/xo-object2/include/xo/object2/DFloat.hpp index 95322042..edd4f1ec 100644 --- a/xo-object2/include/xo/object2/DFloat.hpp +++ b/xo-object2/include/xo/object2/DFloat.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +//#include #include #include #include @@ -15,7 +15,7 @@ namespace xo { namespace scm { struct DFloat { using AAllocator = xo::mm::AAllocator; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using ppindentinfo = xo::print::ppindentinfo; using value_type = double; @@ -36,7 +36,7 @@ namespace xo { bool pretty(const ppindentinfo & ppii) const; // GCObject facet - DFloat * shallow_move(obj gc) noexcept; + DFloat * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DInteger.hpp b/xo-object2/include/xo/object2/DInteger.hpp index 4b0552ba..d82d9890 100644 --- a/xo-object2/include/xo/object2/DInteger.hpp +++ b/xo-object2/include/xo/object2/DInteger.hpp @@ -5,7 +5,7 @@ #pragma once -#include +//#include #include #include #include @@ -16,7 +16,7 @@ namespace xo { namespace scm { struct DInteger { using AAllocator = xo::mm::AAllocator; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AGCObject = xo::mm::AGCObject; using ppindentinfo = xo::print::ppindentinfo; @@ -41,7 +41,7 @@ namespace xo { // GCObject facet - DInteger * shallow_move(obj gc) noexcept; + DInteger * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DList.hpp b/xo-object2/include/xo/object2/DList.hpp index e694acb9..da21ca44 100644 --- a/xo-object2/include/xo/object2/DList.hpp +++ b/xo-object2/include/xo/object2/DList.hpp @@ -5,6 +5,7 @@ #pragma once +#include #include #include #include @@ -70,7 +71,7 @@ namespace xo { /** @defgroup xo-scm-list-gcobject-facet gcobject facet **/ ///@{ - DList * shallow_move(obj gc) noexcept; + DList * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DRuntimeError.hpp b/xo-object2/include/xo/object2/DRuntimeError.hpp index 782185b3..43fe4a03 100644 --- a/xo-object2/include/xo/object2/DRuntimeError.hpp +++ b/xo-object2/include/xo/object2/DRuntimeError.hpp @@ -17,7 +17,7 @@ namespace xo { class DRuntimeError { public: using AGCObject = xo::mm::AGCObject; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; @@ -50,7 +50,7 @@ namespace xo { /** @defgroup scm-runtimeerror-gcobject-facet gcobject facet **/ ///@{ - DRuntimeError * shallow_move(obj gc) noexcept; + DRuntimeError * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp b/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp index bb326f01..75399cf3 100644 --- a/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp +++ b/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DArray & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DArray & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp b/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp index 9ad66430..30fc70fe 100644 --- a/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp +++ b/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DBoolean & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DBoolean & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp b/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp index d389bf67..5d45179b 100644 --- a/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp +++ b/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DDictionary & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DDictionary & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp b/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp index 1b2a822e..a0039ad9 100644 --- a/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp +++ b/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DRuntimeError & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DRuntimeError & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/list/IGCObject_DList.hpp b/xo-object2/include/xo/object2/list/IGCObject_DList.hpp index dcc86383..4002106e 100644 --- a/xo-object2/include/xo/object2/list/IGCObject_DList.hpp +++ b/xo-object2/include/xo/object2/list/IGCObject_DList.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DList & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DList & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp b/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp index 3cb453e5..eb50bb37 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp @@ -52,8 +52,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DFloat & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DFloat & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp b/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp index 9e7450f6..fece77f5 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DInteger & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DInteger & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-object2/src/object2/DArray.cpp b/xo-object2/src/object2/DArray.cpp index a3658101..f6c16b79 100644 --- a/xo-object2/src/object2/DArray.cpp +++ b/xo-object2/src/object2/DArray.cpp @@ -175,7 +175,7 @@ namespace xo { // gc hooks for IGCObject_DArray DArray * - DArray::shallow_move(obj gc) noexcept + DArray::gco_shallow_move(obj gc) noexcept { // note: not using gc.std_move_for() here. // flexible array -> compiler doesn't know actual DArray allocation size diff --git a/xo-object2/src/object2/DBoolean.cpp b/xo-object2/src/object2/DBoolean.cpp index d2c2b7c8..5d2de407 100644 --- a/xo-object2/src/object2/DBoolean.cpp +++ b/xo-object2/src/object2/DBoolean.cpp @@ -30,7 +30,7 @@ namespace xo { } DBoolean * - DBoolean::shallow_move(obj gc) noexcept + DBoolean::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/DDictionary.cpp b/xo-object2/src/object2/DDictionary.cpp index 63e0e9e8..f7806b6a 100644 --- a/xo-object2/src/object2/DDictionary.cpp +++ b/xo-object2/src/object2/DDictionary.cpp @@ -268,7 +268,7 @@ namespace xo { // ----- gcobject facet ----- DDictionary * - DDictionary::shallow_move(obj gc) noexcept + DDictionary::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/DFloat.cpp b/xo-object2/src/object2/DFloat.cpp index 3515dcfa..99d8b23a 100644 --- a/xo-object2/src/object2/DFloat.cpp +++ b/xo-object2/src/object2/DFloat.cpp @@ -28,7 +28,7 @@ namespace xo { } DFloat * - DFloat::shallow_move(obj gc) noexcept + DFloat::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/DInteger.cpp b/xo-object2/src/object2/DInteger.cpp index b73391cc..1c17d9cf 100644 --- a/xo-object2/src/object2/DInteger.cpp +++ b/xo-object2/src/object2/DInteger.cpp @@ -28,7 +28,7 @@ namespace xo { } DInteger * - DInteger::shallow_move(obj gc) noexcept + DInteger::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/DList.cpp b/xo-object2/src/object2/DList.cpp index 56701180..fc2070ff 100644 --- a/xo-object2/src/object2/DList.cpp +++ b/xo-object2/src/object2/DList.cpp @@ -179,7 +179,7 @@ namespace xo { // ----- GCObject facet ------ DList * - DList::shallow_move(obj gc) noexcept + DList::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/DRuntimeError.cpp b/xo-object2/src/object2/DRuntimeError.cpp index d46dcb20..7edb6227 100644 --- a/xo-object2/src/object2/DRuntimeError.cpp +++ b/xo-object2/src/object2/DRuntimeError.cpp @@ -53,7 +53,7 @@ namespace xo { // ----- GCObject facet ----- DRuntimeError * - DRuntimeError::shallow_move(obj gc) noexcept + DRuntimeError::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-object2/src/object2/IGCObject_DArray.cpp b/xo-object2/src/object2/IGCObject_DArray.cpp index 38a31972..6de8b94d 100644 --- a/xo-object2/src/object2/IGCObject_DArray.cpp +++ b/xo-object2/src/object2/IGCObject_DArray.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DArray::shallow_move(DArray & self, obj gc) noexcept -> Opaque + IGCObject_DArray::gco_shallow_move(DArray & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DArray::visit_gco_children(DArray & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DBoolean.cpp b/xo-object2/src/object2/IGCObject_DBoolean.cpp index d76460df..d791116d 100644 --- a/xo-object2/src/object2/IGCObject_DBoolean.cpp +++ b/xo-object2/src/object2/IGCObject_DBoolean.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DBoolean::shallow_move(DBoolean & self, obj gc) noexcept -> Opaque + IGCObject_DBoolean::gco_shallow_move(DBoolean & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DBoolean::visit_gco_children(DBoolean & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DDictionary.cpp b/xo-object2/src/object2/IGCObject_DDictionary.cpp index cd011b19..41d462c9 100644 --- a/xo-object2/src/object2/IGCObject_DDictionary.cpp +++ b/xo-object2/src/object2/IGCObject_DDictionary.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DDictionary::shallow_move(DDictionary & self, obj gc) noexcept -> Opaque + IGCObject_DDictionary::gco_shallow_move(DDictionary & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DDictionary::visit_gco_children(DDictionary & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DFloat.cpp b/xo-object2/src/object2/IGCObject_DFloat.cpp index ab58f840..adcb9948 100644 --- a/xo-object2/src/object2/IGCObject_DFloat.cpp +++ b/xo-object2/src/object2/IGCObject_DFloat.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DFloat::shallow_move(DFloat & self, obj gc) noexcept -> Opaque + IGCObject_DFloat::gco_shallow_move(DFloat & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DFloat::visit_gco_children(DFloat & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DInteger.cpp b/xo-object2/src/object2/IGCObject_DInteger.cpp index 13ea8379..b4b57fc6 100644 --- a/xo-object2/src/object2/IGCObject_DInteger.cpp +++ b/xo-object2/src/object2/IGCObject_DInteger.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DInteger::shallow_move(DInteger & self, obj gc) noexcept -> Opaque + IGCObject_DInteger::gco_shallow_move(DInteger & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DInteger::visit_gco_children(DInteger & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DList.cpp b/xo-object2/src/object2/IGCObject_DList.cpp index 680d1aa7..79ad3750 100644 --- a/xo-object2/src/object2/IGCObject_DList.cpp +++ b/xo-object2/src/object2/IGCObject_DList.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DList::shallow_move(DList & self, obj gc) noexcept -> Opaque + IGCObject_DList::gco_shallow_move(DList & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DList::visit_gco_children(DList & self, obj fn) noexcept -> void diff --git a/xo-object2/src/object2/IGCObject_DRuntimeError.cpp b/xo-object2/src/object2/IGCObject_DRuntimeError.cpp index 7cce9717..800d72ba 100644 --- a/xo-object2/src/object2/IGCObject_DRuntimeError.cpp +++ b/xo-object2/src/object2/IGCObject_DRuntimeError.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DRuntimeError::shallow_move(DRuntimeError & self, obj gc) noexcept -> Opaque + IGCObject_DRuntimeError::gco_shallow_move(DRuntimeError & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DRuntimeError::visit_gco_children(DRuntimeError & self, obj fn) noexcept -> void diff --git a/xo-procedure2/idl/Procedure.json5 b/xo-procedure2/idl/Procedure.json5 index e73c6d87..25e1fed7 100644 --- a/xo-procedure2/idl/Procedure.json5 +++ b/xo-procedure2/idl/Procedure.json5 @@ -17,7 +17,7 @@ ], namespace1: "xo", namespace2: "scm", - // text after includes, before ASyntaxStateMachine + // text after includes, before AProcedure pretext: [ //"namespace xo { namespace scm { class ARuntimeContext; } }", "namespace xo { namespace scm { class DArray; } }", diff --git a/xo-procedure2/idl/RuntimeContext.json5 b/xo-procedure2/idl/RuntimeContext.json5 index 8736f38d..fd829e6d 100644 --- a/xo-procedure2/idl/RuntimeContext.json5 +++ b/xo-procedure2/idl/RuntimeContext.json5 @@ -7,6 +7,7 @@ includes: [ "", "", + "", "" ], // extra includes in RuntimeContext.hpp, if any diff --git a/xo-procedure2/include/xo/procedure2/DPrimitive.hpp b/xo-procedure2/include/xo/procedure2/DPrimitive.hpp index f0e1b5e8..37798319 100644 --- a/xo-procedure2/include/xo/procedure2/DPrimitive.hpp +++ b/xo-procedure2/include/xo/procedure2/DPrimitive.hpp @@ -76,7 +76,7 @@ namespace xo { using FunctionPtrType = Fn; using Traits = detail::PmFnTraits; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -135,7 +135,7 @@ namespace xo { ///@} /** @defgroup scm-primitive-gcobject-facet **/ ///@{ - Primitive * shallow_move(obj gc) noexcept; + Primitive * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} @@ -193,7 +193,7 @@ namespace xo { template Primitive * - Primitive::shallow_move(obj gc) noexcept { + Primitive::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-procedure2/include/xo/procedure2/detail/ARuntimeContext.hpp b/xo-procedure2/include/xo/procedure2/detail/ARuntimeContext.hpp index c9da6d6e..a6d6d4c3 100644 --- a/xo-procedure2/include/xo/procedure2/detail/ARuntimeContext.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/ARuntimeContext.hpp @@ -16,6 +16,7 @@ // includes (via {facet_includes}) #include #include +#include #include #include #include diff --git a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp index 4fa87f2d..beca0850 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp index 9b87a837..3092e52f 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp index 85dda05b..1fca4b6c 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp index 4acfd814..14e66c34 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp index 0a23e793..994682cd 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-procedure2/include/xo/procedure2/detail/IRuntimeContext_Xfer.hpp b/xo-procedure2/include/xo/procedure2/detail/IRuntimeContext_Xfer.hpp index d1a8e8c7..07b30748 100644 --- a/xo-procedure2/include/xo/procedure2/detail/IRuntimeContext_Xfer.hpp +++ b/xo-procedure2/include/xo/procedure2/detail/IRuntimeContext_Xfer.hpp @@ -15,6 +15,7 @@ #include #include +#include #include namespace xo { diff --git a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp index 0819f51e..150adfd8 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DPrimitive_gco_0::shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept -> Opaque + IGCObject_DPrimitive_gco_0::gco_shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DPrimitive_gco_0::visit_gco_children(DPrimitive_gco_0 & self, obj fn) noexcept -> void diff --git a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp index 7561d167..202389d0 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DPrimitive_gco_1_gco::shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept -> Opaque + IGCObject_DPrimitive_gco_1_gco::gco_shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DPrimitive_gco_1_gco::visit_gco_children(DPrimitive_gco_1_gco & self, obj fn) noexcept -> void diff --git a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp index 522cba9b..c9b4717b 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DPrimitive_gco_2_dict_string::shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_dict_string::gco_shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DPrimitive_gco_2_dict_string::visit_gco_children(DPrimitive_gco_2_dict_string & self, obj fn) noexcept -> void diff --git a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp index 6f7de390..65851b1f 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DPrimitive_gco_2_gco_gco::shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_gco_gco::gco_shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DPrimitive_gco_2_gco_gco::visit_gco_children(DPrimitive_gco_2_gco_gco & self, obj fn) noexcept -> void diff --git a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp index aa6c85c0..89be54af 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DPrimitive_gco_3_dict_string_gco::shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept -> Opaque + IGCObject_DPrimitive_gco_3_dict_string_gco::gco_shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DPrimitive_gco_3_dict_string_gco::visit_gco_children(DPrimitive_gco_3_dict_string_gco & self, obj fn) noexcept -> void diff --git a/xo-reader2/include/xo/reader2/DGlobalEnv.hpp b/xo-reader2/include/xo/reader2/DGlobalEnv.hpp index 04605c4c..6bb88f49 100644 --- a/xo-reader2/include/xo/reader2/DGlobalEnv.hpp +++ b/xo-reader2/include/xo/reader2/DGlobalEnv.hpp @@ -27,7 +27,7 @@ namespace xo { class DGlobalEnv { public: using TypeDescr = xo::reflect::TypeDescr; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -72,7 +72,7 @@ namespace xo { /** @defgroup scm-globalenv-gcobject-facet **/ ///@{ - DGlobalEnv * shallow_move(obj gc) noexcept; + DGlobalEnv * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp b/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp index 2b961b43..f96deebc 100644 --- a/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp +++ b/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DGlobalEnv & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DGlobalEnv & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp b/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp index c3de4930..24e4b46a 100644 --- a/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp +++ b/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp @@ -164,7 +164,7 @@ namespace xo { using token_type = Token; using ArenaHashMapConfig = xo::map::ArenaHashMapConfig; using ArenaConfig = xo::mm::ArenaConfig; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -295,7 +295,7 @@ namespace xo { ///@{ /** not implemented (SchematikaParser not designed to be copyable) **/ - DSchematikaParser * shallow_move(obj gc) noexcept; + DSchematikaParser * gco_shallow_move(obj gc) noexcept; /** forward gc-aware children **/ void visit_gco_children(obj gc) noexcept; diff --git a/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp b/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp index ce93ba8a..64394e65 100644 --- a/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp +++ b/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DSchematikaParser & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DSchematikaParser & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-reader2/src/reader2/DGlobalEnv.cpp b/xo-reader2/src/reader2/DGlobalEnv.cpp index 64eabd4f..8491c60b 100644 --- a/xo-reader2/src/reader2/DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/DGlobalEnv.cpp @@ -108,7 +108,7 @@ namespace xo { // ----- AGCObject facet ----- DGlobalEnv * - DGlobalEnv::shallow_move(obj gc) noexcept + DGlobalEnv::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-reader2/src/reader2/DSchematikaParser.cpp b/xo-reader2/src/reader2/DSchematikaParser.cpp index 1d5ecea7..fc71d12f 100644 --- a/xo-reader2/src/reader2/DSchematikaParser.cpp +++ b/xo-reader2/src/reader2/DSchematikaParser.cpp @@ -185,7 +185,7 @@ namespace xo { } DSchematikaParser * - DSchematikaParser::shallow_move(obj gc) noexcept + DSchematikaParser::gco_shallow_move(obj gc) noexcept { (void)gc; diff --git a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp index e826c422..9a2802ae 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DGlobalEnv::shallow_move(DGlobalEnv & self, obj gc) noexcept -> Opaque + IGCObject_DGlobalEnv::gco_shallow_move(DGlobalEnv & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DGlobalEnv::visit_gco_children(DGlobalEnv & self, obj fn) noexcept -> void diff --git a/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp b/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp index cd9ec847..f1778d5a 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DSchematikaParser::shallow_move(DSchematikaParser & self, obj gc) noexcept -> Opaque + IGCObject_DSchematikaParser::gco_shallow_move(DSchematikaParser & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DSchematikaParser::visit_gco_children(DSchematikaParser & self, obj fn) noexcept -> void diff --git a/xo-stringtable2/include/xo/stringtable2/DString.hpp b/xo-stringtable2/include/xo/stringtable2/DString.hpp index 75090f24..7d736a37 100644 --- a/xo-stringtable2/include/xo/stringtable2/DString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/DString.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +//#include #include #include #include @@ -47,7 +47,7 @@ namespace xo { /** xo allocator **/ using AAllocator = xo::mm::AAllocator; /** garbage collector **/ - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; /** object visitor (garbage collector proxy) **/ using AGCObjectVisitor = xo::mm::AGCObjectVisitor; /** ppindentinfo for APrintable **/ @@ -245,10 +245,8 @@ namespace xo { /** @defgroup dstring-gcobject-methods gcobject facet methods **/ ///@{ - size_type shallow_size() const noexcept; - /** clone string, using memory from allocator @p mm **/ - DString * shallow_move(obj gc) noexcept; + DString * gco_shallow_move(obj gc) noexcept; /** fixup child pointers (trivial for DString, no children) * note: cref so we can use forward decl diff --git a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp index 7e3502b2..27a364ed 100644 --- a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp @@ -90,7 +90,7 @@ namespace xo { ///@{ /** clone unique string, using memory from allocator @p mm. **/ - DUniqueString * shallow_move(obj gc) noexcept; + DUniqueString * gco_shallow_move(obj gc) noexcept; /** fixup child pointers (trivial for DUniqueString, no gc-owned children **/ void visit_gco_children(obj gc) noexcept; diff --git a/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp b/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp index 9248a896..f35b0a54 100644 --- a/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DString & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DString & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp b/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp index 283af3a0..5771e05e 100644 --- a/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp @@ -53,8 +53,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DUniqueString & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DUniqueString & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-stringtable2/src/stringtable2/DString.cpp b/xo-stringtable2/src/stringtable2/DString.cpp index 7bd16fba..1b9ce48f 100644 --- a/xo-stringtable2/src/stringtable2/DString.cpp +++ b/xo-stringtable2/src/stringtable2/DString.cpp @@ -149,14 +149,8 @@ namespace xo { return this->size_; } - auto - DString::shallow_size() const noexcept -> size_type - { - return sizeof(DString) + capacity_; - } - DString * - DString::shallow_move(obj gc) noexcept + DString::gco_shallow_move(obj gc) noexcept { // note: not using gc.std_move_for() here // b/c DString flexible array means not move-constructible diff --git a/xo-stringtable2/src/stringtable2/DUniqueString.cpp b/xo-stringtable2/src/stringtable2/DUniqueString.cpp index 2660e5d6..98371add 100644 --- a/xo-stringtable2/src/stringtable2/DUniqueString.cpp +++ b/xo-stringtable2/src/stringtable2/DUniqueString.cpp @@ -82,7 +82,7 @@ namespace xo { } DUniqueString * - DUniqueString::shallow_move(obj gc) noexcept + DUniqueString::gco_shallow_move(obj gc) noexcept { // well-posed, but not expected to be used. // diff --git a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp index f77077b3..716c043a 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DString::shallow_move(DString & self, obj gc) noexcept -> Opaque + IGCObject_DString::gco_shallow_move(DString & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DString::visit_gco_children(DString & self, obj fn) noexcept -> void diff --git a/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp b/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp index a2591484..e43fc8b6 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DUniqueString::shallow_move(DUniqueString & self, obj gc) noexcept -> Opaque + IGCObject_DUniqueString::gco_shallow_move(DUniqueString & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DUniqueString::visit_gco_children(DUniqueString & self, obj fn) noexcept -> void diff --git a/xo-type/include/xo/type/DArrayType.hpp b/xo-type/include/xo/type/DArrayType.hpp index 92a9ecac..0f128037 100644 --- a/xo-type/include/xo/type/DArrayType.hpp +++ b/xo-type/include/xo/type/DArrayType.hpp @@ -7,7 +7,7 @@ #include "Type.hpp" #include "Metatype.hpp" -#include +//#include #include #include @@ -19,7 +19,7 @@ namespace xo { **/ class DArrayType { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -43,8 +43,7 @@ namespace xo { ///@} /** @defgroup xo-scm-arraytype-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DArrayType * shallow_move(obj gc) noexcept; + DArrayType * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DAtomicType.hpp b/xo-type/include/xo/type/DAtomicType.hpp index 3274b882..1338c1d6 100644 --- a/xo-type/include/xo/type/DAtomicType.hpp +++ b/xo-type/include/xo/type/DAtomicType.hpp @@ -7,7 +7,7 @@ #include "Type.hpp" #include "Metatype.hpp" -#include +//#include #include #include @@ -22,7 +22,7 @@ namespace xo { **/ class DAtomicType { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -44,8 +44,7 @@ namespace xo { ///@} /** @defgroup xo-scm-atomictype-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DAtomicType * shallow_move(obj gc) noexcept; + DAtomicType * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DFunctionType.hpp b/xo-type/include/xo/type/DFunctionType.hpp index 66b92c1e..19d8bbee 100644 --- a/xo-type/include/xo/type/DFunctionType.hpp +++ b/xo-type/include/xo/type/DFunctionType.hpp @@ -8,7 +8,7 @@ #include "Type.hpp" #include "Metatype.hpp" #include -#include +//#include #include #include @@ -20,7 +20,7 @@ namespace xo { **/ class DFunctionType { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -65,8 +65,7 @@ namespace xo { ///@} /** @defgroup xo-scm-arraytype-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DFunctionType * shallow_move(obj gc) noexcept; + DFunctionType * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DListType.hpp b/xo-type/include/xo/type/DListType.hpp index c6fa0309..7ca75176 100644 --- a/xo-type/include/xo/type/DListType.hpp +++ b/xo-type/include/xo/type/DListType.hpp @@ -8,7 +8,7 @@ #include "Type.hpp" #include "Metatype.hpp" #include -#include +//#include #include #include @@ -24,7 +24,7 @@ namespace xo { class DListType { public: using TypeDescr = xo::reflect::TypeDescr; - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; @@ -51,8 +51,7 @@ namespace xo { ///@} /** @defgroup xo-scm-listtype-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DListType * shallow_move(obj gc) noexcept; + DListType * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp b/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp index af44afb8..f03e6b9a 100644 --- a/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp +++ b/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DArrayType & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DArrayType & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp b/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp index 0acce5ad..dbba8a3a 100644 --- a/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp +++ b/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DAtomicType & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DAtomicType & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp b/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp index c368f573..6840ffd6 100644 --- a/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp +++ b/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DFunctionType & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DFunctionType & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-type/include/xo/type/list/IGCObject_DListType.hpp b/xo-type/include/xo/type/list/IGCObject_DListType.hpp index 07903f03..752bb76e 100644 --- a/xo-type/include/xo/type/list/IGCObject_DListType.hpp +++ b/xo-type/include/xo/type/list/IGCObject_DListType.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DListType & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DListType & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-type/include/xo/type/typevar/DTypeVarRef.hpp b/xo-type/include/xo/type/typevar/DTypeVarRef.hpp index 9e1d6b98..d1f8258e 100644 --- a/xo-type/include/xo/type/typevar/DTypeVarRef.hpp +++ b/xo-type/include/xo/type/typevar/DTypeVarRef.hpp @@ -7,7 +7,7 @@ #include "Type.hpp" #include "Metatype.hpp" -#include +//#include #include #include @@ -22,7 +22,7 @@ namespace xo { **/ class DTypeVarRef { public: - using ACollector = xo::mm::ACollector; + //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AAllocator = xo::mm::AAllocator; using TypeDescr = xo::reflect::TypeDescr; @@ -54,8 +54,7 @@ namespace xo { ///@} /** @defgroup xo-scm-atomictype-gcobject-facet **/ ///@{ - std::size_t shallow_size() const noexcept; - DTypeVarRef * shallow_move(obj gc) noexcept; + DTypeVarRef * gco_shallow_move(obj gc) noexcept; void visit_gco_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp b/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp index a943a3c6..d837afa2 100644 --- a/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp +++ b/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp @@ -51,8 +51,9 @@ namespace xo { // const methods // non-const methods - /** move instance using collector **/ - static Opaque shallow_move(DTypeVarRef & self, obj gc) noexcept; + /** move instance using object visitor. +Arguably abusing the word 'visitor' here **/ + static Opaque gco_shallow_move(DTypeVarRef & self, obj gc) noexcept; /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ diff --git a/xo-type/src/type/DArrayType.cpp b/xo-type/src/type/DArrayType.cpp index 4a172f92..891a83c8 100644 --- a/xo-type/src/type/DArrayType.cpp +++ b/xo-type/src/type/DArrayType.cpp @@ -76,14 +76,8 @@ namespace xo { // ----- gcobject facet ----- - std::size_t - DArrayType::shallow_size() const noexcept - { - return sizeof(*this); - } - DArrayType * - DArrayType::shallow_move(obj gc) noexcept + DArrayType::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-type/src/type/DAtomicType.cpp b/xo-type/src/type/DAtomicType.cpp index 070683b0..6c024344 100644 --- a/xo-type/src/type/DAtomicType.cpp +++ b/xo-type/src/type/DAtomicType.cpp @@ -54,14 +54,8 @@ namespace xo { // ----- GCObject facet ----- - std::size_t - DAtomicType::shallow_size() const noexcept - { - return sizeof(DAtomicType); - } - DAtomicType * - DAtomicType::shallow_move(obj gc) noexcept + DAtomicType::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-type/src/type/DFunctionType.cpp b/xo-type/src/type/DFunctionType.cpp index b27e9ac1..934fae15 100644 --- a/xo-type/src/type/DFunctionType.cpp +++ b/xo-type/src/type/DFunctionType.cpp @@ -87,14 +87,8 @@ namespace xo { // ----- gcobject facet ----- - std::size_t - DFunctionType::shallow_size() const noexcept - { - return sizeof(*this); - } - DFunctionType * - DFunctionType::shallow_move(obj gc) noexcept + DFunctionType::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-type/src/type/DListType.cpp b/xo-type/src/type/DListType.cpp index 0ffdf8de..20a69302 100644 --- a/xo-type/src/type/DListType.cpp +++ b/xo-type/src/type/DListType.cpp @@ -81,14 +81,8 @@ namespace xo { // ----- gcobject facet ----- - std::size_t - DListType::shallow_size() const noexcept - { - return sizeof(*this); - } - DListType * - DListType::shallow_move(obj gc) noexcept + DListType::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-type/src/type/DTypeVarRef.cpp b/xo-type/src/type/DTypeVarRef.cpp index a540c623..d9f38160 100644 --- a/xo-type/src/type/DTypeVarRef.cpp +++ b/xo-type/src/type/DTypeVarRef.cpp @@ -75,14 +75,8 @@ namespace xo { // ----- GCObject facet ----- - std::size_t - DTypeVarRef::shallow_size() const noexcept - { - return sizeof(DTypeVarRef); - } - DTypeVarRef * - DTypeVarRef::shallow_move(obj gc) noexcept + DTypeVarRef::gco_shallow_move(obj gc) noexcept { return gc.std_move_for(this); } diff --git a/xo-type/src/type/IGCObject_DArrayType.cpp b/xo-type/src/type/IGCObject_DArrayType.cpp index 3483c40e..d778c3aa 100644 --- a/xo-type/src/type/IGCObject_DArrayType.cpp +++ b/xo-type/src/type/IGCObject_DArrayType.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DArrayType::shallow_move(DArrayType & self, obj gc) noexcept -> Opaque + IGCObject_DArrayType::gco_shallow_move(DArrayType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DArrayType::visit_gco_children(DArrayType & self, obj fn) noexcept -> void diff --git a/xo-type/src/type/IGCObject_DAtomicType.cpp b/xo-type/src/type/IGCObject_DAtomicType.cpp index 2d891efb..13b4a83f 100644 --- a/xo-type/src/type/IGCObject_DAtomicType.cpp +++ b/xo-type/src/type/IGCObject_DAtomicType.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DAtomicType::shallow_move(DAtomicType & self, obj gc) noexcept -> Opaque + IGCObject_DAtomicType::gco_shallow_move(DAtomicType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DAtomicType::visit_gco_children(DAtomicType & self, obj fn) noexcept -> void diff --git a/xo-type/src/type/IGCObject_DFunctionType.cpp b/xo-type/src/type/IGCObject_DFunctionType.cpp index 36d76b43..65bdd67b 100644 --- a/xo-type/src/type/IGCObject_DFunctionType.cpp +++ b/xo-type/src/type/IGCObject_DFunctionType.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DFunctionType::shallow_move(DFunctionType & self, obj gc) noexcept -> Opaque + IGCObject_DFunctionType::gco_shallow_move(DFunctionType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DFunctionType::visit_gco_children(DFunctionType & self, obj fn) noexcept -> void diff --git a/xo-type/src/type/IGCObject_DListType.cpp b/xo-type/src/type/IGCObject_DListType.cpp index 68130a80..032a3f5d 100644 --- a/xo-type/src/type/IGCObject_DListType.cpp +++ b/xo-type/src/type/IGCObject_DListType.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DListType::shallow_move(DListType & self, obj gc) noexcept -> Opaque + IGCObject_DListType::gco_shallow_move(DListType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DListType::visit_gco_children(DListType & self, obj fn) noexcept -> void diff --git a/xo-type/src/type/IGCObject_DTypeVarRef.cpp b/xo-type/src/type/IGCObject_DTypeVarRef.cpp index 3ff82f33..8c5422db 100644 --- a/xo-type/src/type/IGCObject_DTypeVarRef.cpp +++ b/xo-type/src/type/IGCObject_DTypeVarRef.cpp @@ -16,9 +16,9 @@ namespace xo { namespace scm { auto - IGCObject_DTypeVarRef::shallow_move(DTypeVarRef & self, obj gc) noexcept -> Opaque + IGCObject_DTypeVarRef::gco_shallow_move(DTypeVarRef & self, obj gc) noexcept -> Opaque { - return self.shallow_move(gc); + return self.gco_shallow_move(gc); } auto IGCObject_DTypeVarRef::visit_gco_children(DTypeVarRef & self, obj fn) noexcept -> void