diff --git a/include/xo/procedure2/DPrimitive.hpp b/include/xo/procedure2/DPrimitive.hpp index f602ebb..d55e01e 100644 --- a/include/xo/procedure2/DPrimitive.hpp +++ b/include/xo/procedure2/DPrimitive.hpp @@ -134,7 +134,7 @@ namespace xo { /** @defgroup scm-primitive-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - Primitive * shallow_move(obj mm) const noexcept; + Primitive * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} @@ -198,14 +198,8 @@ namespace xo { template Primitive * - Primitive::shallow_move(obj mm) const noexcept { - void * mem = mm.alloc_copy((std::byte *)this); - - if (mem) { - return new (mem) Primitive(*this); - } - - return nullptr; + Primitive::shallow_move(obj gc) noexcept { + return gc.std_copy_for(this); } template diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp index cecc298..53c073a 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DPrimitive_gco_0 & self, obj mm) noexcept; + static Opaque shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DPrimitive_gco_0 & self, obj gc) 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 ac5c4f5..e2dd638 100644 --- a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_1_gco.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DPrimitive_gco_1_gco & self, obj mm) noexcept; + static Opaque shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DPrimitive_gco_1_gco & self, obj gc) 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 772aabb..c21ab14 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 @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DPrimitive_gco_2_dict_string & self, obj mm) noexcept; + static Opaque shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DPrimitive_gco_2_dict_string & self, obj gc) 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 266d1f4..b35e100 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 @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DPrimitive_gco_2_gco_gco & self, obj mm) noexcept; + static Opaque shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DPrimitive_gco_2_gco_gco & self, obj gc) 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 7abc136..d0e23e3 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 @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj mm) noexcept; + static Opaque shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept; ///@} diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp index 948d1d6..2e0198f 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_0::shallow_move(DPrimitive_gco_0 & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_0::shallow_move(DPrimitive_gco_0 & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DPrimitive_gco_0::forward_children(DPrimitive_gco_0 & self, obj gc) noexcept -> size_type diff --git a/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp b/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp index b5c1754..2612c88 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_1_gco::shallow_move(DPrimitive_gco_1_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_1_gco::shallow_move(DPrimitive_gco_1_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DPrimitive_gco_1_gco::forward_children(DPrimitive_gco_1_gco & self, obj gc) noexcept -> size_type 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 7c58550..6173f6c 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_dict_string.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_2_dict_string::shallow_move(DPrimitive_gco_2_dict_string & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_dict_string::shallow_move(DPrimitive_gco_2_dict_string & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DPrimitive_gco_2_dict_string::forward_children(DPrimitive_gco_2_dict_string & self, obj gc) noexcept -> size_type 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 347295b..ab7cc1b 100644 --- a/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp +++ b/src/procedure2/facet/IGCObject_DPrimitive_gco_2_gco_gco.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_2_gco_gco::shallow_move(DPrimitive_gco_2_gco_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_gco_gco::shallow_move(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DPrimitive_gco_2_gco_gco::forward_children(DPrimitive_gco_2_gco_gco & self, obj gc) noexcept -> size_type 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 26a9f3f..4134581 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 @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_3_dict_string_gco::shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_3_dict_string_gco::shallow_move(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DPrimitive_gco_3_dict_string_gco::forward_children(DPrimitive_gco_3_dict_string_gco & self, obj gc) noexcept -> size_type