diff --git a/include/xo/procedure2/DPrimitive.hpp b/include/xo/procedure2/DPrimitive.hpp index 3779831..a5b0125 100644 --- a/include/xo/procedure2/DPrimitive.hpp +++ b/include/xo/procedure2/DPrimitive.hpp @@ -75,10 +75,9 @@ namespace xo { public: using FunctionPtrType = Fn; using Traits = detail::PmFnTraits; - - //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using DArray = xo::scm::DArray; using Reflect = xo::reflect::Reflect; @@ -136,7 +135,7 @@ namespace xo { /** @defgroup scm-primitive-gcobject-facet **/ ///@{ Primitive * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} private: @@ -199,8 +198,9 @@ namespace xo { template void - Primitive::visit_gco_children(obj gc) noexcept { - gc.visit_poly_child(&type_); + Primitive::visit_gco_children(xo::mm::VisitReason reason, + obj gc) noexcept { + gc.visit_poly_child(reason, &type_); //{ // auto e = type_.to_facet(); // FacetRegistry dep // gc.forward_inplace(e.iface(), (void **)&(type_.data_)); diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp index beca085..63986f8 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** 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 **/ - static void visit_gco_children(DPrimitive_gco_0 & self, obj fn) noexcept; + static void visit_gco_children(DPrimitive_gco_0 & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp index 3092e52..c15dedb 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** 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 **/ - static void visit_gco_children(DPrimitive_gco_1_gco & self, obj fn) noexcept; + static void visit_gco_children(DPrimitive_gco_1_gco & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp index 1fca4b6..6cc1754 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_dict_string.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** 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 **/ - static void visit_gco_children(DPrimitive_gco_2_dict_string & self, obj fn) noexcept; + static void visit_gco_children(DPrimitive_gco_2_dict_string & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp index 14e66c3..52c46f4 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** 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 **/ - static void visit_gco_children(DPrimitive_gco_2_gco_gco & self, obj fn) noexcept; + static void visit_gco_children(DPrimitive_gco_2_gco_gco & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp index 994682c..cc8294e 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_3_dict_string_gco.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** 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 **/ - static void visit_gco_children(DPrimitive_gco_3_dict_string_gco & self, obj fn) noexcept; + static void visit_gco_children(DPrimitive_gco_3_dict_string_gco & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp index 150adfd..80b04c1 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DPrimitive_gco_0::visit_gco_children(DPrimitive_gco_0 & self, obj fn) noexcept -> void + IGCObject_DPrimitive_gco_0::visit_gco_children(DPrimitive_gco_0 & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp index 202389d..865cd64 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DPrimitive_gco_1_gco::visit_gco_children(DPrimitive_gco_1_gco & self, obj fn) noexcept -> void + IGCObject_DPrimitive_gco_1_gco::visit_gco_children(DPrimitive_gco_1_gco & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp index c9b4717..5e9bbcb 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp @@ -21,9 +21,9 @@ namespace xo { 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 + IGCObject_DPrimitive_gco_2_dict_string::visit_gco_children(DPrimitive_gco_2_dict_string & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp index 65851b1..ef410d8 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp @@ -21,9 +21,9 @@ namespace xo { 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 + IGCObject_DPrimitive_gco_2_gco_gco::visit_gco_children(DPrimitive_gco_2_gco_gco & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp index 89be54a..58e26de 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_3_dict_string_gco.cpp @@ -21,9 +21,9 @@ namespace xo { 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 + IGCObject_DPrimitive_gco_3_dict_string_gco::visit_gco_children(DPrimitive_gco_3_dict_string_gco & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/