diff --git a/xo-alloc2/idl/GCObject.json5 b/xo-alloc2/idl/GCObject.json5 index 8f7e071f..0b4dfdf9 100644 --- a/xo-alloc2/idl/GCObject.json5 +++ b/xo-alloc2/idl/GCObject.json5 @@ -62,7 +62,7 @@ doc: ["move instance using allocator"], return_type: "Opaque", args:[ - {type: "obj", name: "mm"}, + {type: "obj", name: "gc"}, ], const: true, noexcept: true, diff --git a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp index ee0703d9..44c777e9 100644 --- a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp @@ -67,7 +67,7 @@ public: // nonconst methods /** move instance using allocator **/ - virtual Opaque shallow_move(Opaque data, obj mm) const noexcept = 0; + virtual Opaque shallow_move(Opaque data, obj gc) const noexcept = 0; /** during GC: forward immdiate children **/ virtual size_type forward_children(Opaque data, obj gc) const noexcept = 0; ///@} diff --git a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp index 000c85fe..25ff5db3 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 { [[noreturn]] size_type shallow_size(Copaque) const noexcept override { _fatal(); } // nonconst methods - [[noreturn]] Opaque shallow_move(Opaque, obj) const noexcept override; + [[noreturn]] Opaque shallow_move(Opaque, obj) const noexcept override; [[noreturn]] size_type forward_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 35e23a62..b311e6f3 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp @@ -54,8 +54,8 @@ namespace mm { } // non-const methods - Opaque shallow_move(Opaque data, obj mm) const noexcept override { - return I::shallow_move(_dcast(data), mm); + Opaque shallow_move(Opaque data, obj gc) const noexcept override { + return I::shallow_move(_dcast(data), gc); } size_type forward_children(Opaque data, obj gc) const noexcept override { return I::forward_children(_dcast(data), gc); diff --git a/xo-alloc2/include/xo/alloc2/gc/RCollector.hpp b/xo-alloc2/include/xo/alloc2/gc/RCollector.hpp index 6192c08d..3bb21468 100644 --- a/xo-alloc2/include/xo/alloc2/gc/RCollector.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/RCollector.hpp @@ -52,38 +52,38 @@ public: void * alloc_copy_for(const T * src) noexcept { return O::iface()->alloc_copy(O::data(), (std::byte *)const_cast(src)); } - + /** convenience template for move-constructible T (this is common) **/ template - void * std_copy_for(const T * src) noexcept { + T * std_copy_for(T * src) noexcept { void * mem = this->alloc_copy_for(src); if (mem) { return new (mem) T(std::move(*src)); } return nullptr; } - + /** forward faceted object pointer in place. Defined in GCObject.hpp to avoid #include cycle **/ template void forward_inplace(obj * p_obj); - + /** another convenience template for forwarding. * Defined in RGCObject.hpp to avoid #include cycle. **/ template void forward_inplace(DRepr ** pp_repr); - + /** convenience template where pointer requires pivot **/ template requires (!std::is_same_v) void forward_pivot_inplace(obj * p_obj); - + /** add root @p p_root **/ template void add_gc_root(obj * p_root) { O::iface()->add_gc_root_poly(O::data(), (obj *)p_root); } - + /** remove root @p p_root **/ template void remove_gc_root(obj * p_root) { diff --git a/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp index 1839f83b..673e6e03 100644 --- a/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp @@ -60,8 +60,8 @@ public: } // non-const methods (still const in router!) - Opaque shallow_move(obj mm) noexcept { - return O::iface()->shallow_move(O::data(), mm); + Opaque shallow_move(obj gc) noexcept { + return O::iface()->shallow_move(O::data(), gc); } size_type forward_children(obj gc) noexcept { return O::iface()->forward_children(O::data(), gc); diff --git a/xo-alloc2/src/alloc2/IGCObject_Any.cpp b/xo-alloc2/src/alloc2/IGCObject_Any.cpp index c9b9329b..a22df0f5 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::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 072567c1..b4119def 100644 --- a/xo-expression2/include/xo/expression2/DApplyExpr.hpp +++ b/xo-expression2/include/xo/expression2/DApplyExpr.hpp @@ -83,7 +83,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DApplyExpr * shallow_move(obj mm) const noexcept; + DApplyExpr * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DConstant.hpp b/xo-expression2/include/xo/expression2/DConstant.hpp index da557fc9..e78440ad 100644 --- a/xo-expression2/include/xo/expression2/DConstant.hpp +++ b/xo-expression2/include/xo/expression2/DConstant.hpp @@ -63,7 +63,7 @@ namespace xo { ///@{ size_t shallow_size() const noexcept; - DConstant * shallow_move(obj mm) const noexcept; + DConstant * shallow_move(obj gc) noexcept; size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DDefineExpr.hpp b/xo-expression2/include/xo/expression2/DDefineExpr.hpp index b2cd7ed6..1e20c530 100644 --- a/xo-expression2/include/xo/expression2/DDefineExpr.hpp +++ b/xo-expression2/include/xo/expression2/DDefineExpr.hpp @@ -73,7 +73,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DDefineExpr * shallow_move(obj mm) noexcept; + DDefineExpr * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp b/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp index 9ce29a6e..c6fcdcf1 100644 --- a/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/DGlobalSymtab.hpp @@ -43,6 +43,9 @@ namespace xo { DGlobalSymtab(dp var_map, DArray * vars, dp type_map, DArray * types); + /** move constructor (needed because dp<> deletes copy ctor) **/ + DGlobalSymtab(DGlobalSymtab && other) = default; + /** create instance. * Use memory from @p fixed_mm for @ref map_. * Use memory from @p mm for DGlobalSymtab instance. @@ -111,7 +114,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DGlobalSymtab * shallow_move(obj mm) const noexcept; + DGlobalSymtab * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DIfElseExpr.hpp b/xo-expression2/include/xo/expression2/DIfElseExpr.hpp index 1f04ced0..8ffee429 100644 --- a/xo-expression2/include/xo/expression2/DIfElseExpr.hpp +++ b/xo-expression2/include/xo/expression2/DIfElseExpr.hpp @@ -99,7 +99,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DIfElseExpr * shallow_move(obj mm) const noexcept; + DIfElseExpr * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DLambdaExpr.hpp b/xo-expression2/include/xo/expression2/DLambdaExpr.hpp index 58495395..0d8d2391 100644 --- a/xo-expression2/include/xo/expression2/DLambdaExpr.hpp +++ b/xo-expression2/include/xo/expression2/DLambdaExpr.hpp @@ -85,7 +85,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DLambdaExpr * shallow_move(obj mm) const noexcept; + DLambdaExpr * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DLocalSymtab.hpp b/xo-expression2/include/xo/expression2/DLocalSymtab.hpp index dbaad170..b2843cb9 100644 --- a/xo-expression2/include/xo/expression2/DLocalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/DLocalSymtab.hpp @@ -98,7 +98,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DLocalSymtab * shallow_move(obj mm) noexcept; + DLocalSymtab * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DSequenceExpr.hpp b/xo-expression2/include/xo/expression2/DSequenceExpr.hpp index c70f5e72..f876cfac 100644 --- a/xo-expression2/include/xo/expression2/DSequenceExpr.hpp +++ b/xo-expression2/include/xo/expression2/DSequenceExpr.hpp @@ -73,7 +73,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DSequenceExpr * shallow_move(obj mm) const noexcept; + DSequenceExpr * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DTypename.hpp b/xo-expression2/include/xo/expression2/DTypename.hpp index 667082ad..7bd30931 100644 --- a/xo-expression2/include/xo/expression2/DTypename.hpp +++ b/xo-expression2/include/xo/expression2/DTypename.hpp @@ -54,7 +54,7 @@ namespace xo { ///@{ size_t shallow_size() const noexcept; - DTypename * shallow_move(obj mm) noexcept; + DTypename * shallow_move(obj gc) noexcept; size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DVarRef.hpp b/xo-expression2/include/xo/expression2/DVarRef.hpp index 26305923..65abddb2 100644 --- a/xo-expression2/include/xo/expression2/DVarRef.hpp +++ b/xo-expression2/include/xo/expression2/DVarRef.hpp @@ -55,7 +55,7 @@ namespace xo { ///@{ size_t shallow_size() const noexcept; - DVarRef * shallow_move(obj mm) const noexcept; + DVarRef * shallow_move(obj gc) noexcept; size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/DVariable.hpp b/xo-expression2/include/xo/expression2/DVariable.hpp index 1b4f31d2..12abae94 100644 --- a/xo-expression2/include/xo/expression2/DVariable.hpp +++ b/xo-expression2/include/xo/expression2/DVariable.hpp @@ -63,7 +63,7 @@ namespace xo { ///@{ size_t shallow_size() const noexcept; - DVariable * shallow_move(obj mm) const noexcept; + DVariable * shallow_move(obj gc) noexcept; size_t forward_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 df303b98..b2c45805 100644 --- a/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp +++ b/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DDefineExpr & self, obj mm) noexcept; + static Opaque shallow_move(DDefineExpr & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DDefineExpr & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp index c0b0f35b..75eac694 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DApplyExpr & self, obj mm) noexcept; + static Opaque shallow_move(DApplyExpr & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DApplyExpr & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp index 35bfbaa2..9cb72026 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DConstant & self, obj mm) noexcept; + static Opaque shallow_move(DConstant & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DConstant & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp index 5f9cf68e..e7d6fcfd 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DIfElseExpr & self, obj mm) noexcept; + static Opaque shallow_move(DIfElseExpr & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DIfElseExpr & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp index f44d2ac8..6cf2cd6c 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DLambdaExpr & self, obj mm) noexcept; + static Opaque shallow_move(DLambdaExpr & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DLambdaExpr & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp index df29b94f..9a9b3f9d 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DSequenceExpr & self, obj mm) noexcept; + static Opaque shallow_move(DSequenceExpr & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DSequenceExpr & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp index d002c5c9..3ca237b6 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVarRef & self, obj mm) noexcept; + static Opaque shallow_move(DVarRef & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVarRef & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp index f2a64385..43436ac8 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DGlobalSymtab & self, obj mm) noexcept; + static Opaque shallow_move(DGlobalSymtab & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DGlobalSymtab & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp b/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp index a5c0cd04..c8b9cca1 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DLocalSymtab & self, obj mm) noexcept; + static Opaque shallow_move(DLocalSymtab & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DLocalSymtab & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp b/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp index 45781a2e..d002a847 100644 --- a/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp +++ b/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DTypename & self, obj mm) noexcept; + static Opaque shallow_move(DTypename & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DTypename & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp b/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp index 9621d0f3..5fd34c21 100644 --- a/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp +++ b/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVariable & self, obj mm) noexcept; + static Opaque shallow_move(DVariable & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVariable & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/src/expression2/DApplyExpr.cpp b/xo-expression2/src/expression2/DApplyExpr.cpp index 80f25139..9683d459 100644 --- a/xo-expression2/src/expression2/DApplyExpr.cpp +++ b/xo-expression2/src/expression2/DApplyExpr.cpp @@ -110,8 +110,11 @@ namespace xo { } DApplyExpr * - DApplyExpr::shallow_move(obj mm) const noexcept { - DApplyExpr * copy = (DApplyExpr *)mm.alloc_copy((std::byte *)this); + DApplyExpr::shallow_move(obj gc) noexcept { + // note: not using ACollector.std_copy_for() here, + // flexible array -> not move-constructible + + DApplyExpr * copy = (DApplyExpr *)gc.alloc_copy_for(this); if (copy) { copy->typeref_ = typeref_; diff --git a/xo-expression2/src/expression2/DConstant.cpp b/xo-expression2/src/expression2/DConstant.cpp index ea7a3d9f..420431bc 100644 --- a/xo-expression2/src/expression2/DConstant.cpp +++ b/xo-expression2/src/expression2/DConstant.cpp @@ -78,14 +78,9 @@ namespace xo { } DConstant * - DConstant::shallow_move(obj mm) const noexcept + DConstant::shallow_move(obj gc) noexcept { - DConstant * copy = (DConstant *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DDefineExpr.cpp b/xo-expression2/src/expression2/DDefineExpr.cpp index 014da87c..e324b528 100644 --- a/xo-expression2/src/expression2/DDefineExpr.cpp +++ b/xo-expression2/src/expression2/DDefineExpr.cpp @@ -85,9 +85,9 @@ namespace xo { } DDefineExpr * - DDefineExpr::shallow_move(obj mm) noexcept + DDefineExpr::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DGlobalSymtab.cpp b/xo-expression2/src/expression2/DGlobalSymtab.cpp index 2ea5b2ec..8d0f74cf 100644 --- a/xo-expression2/src/expression2/DGlobalSymtab.cpp +++ b/xo-expression2/src/expression2/DGlobalSymtab.cpp @@ -261,25 +261,9 @@ namespace xo { } DGlobalSymtab * - DGlobalSymtab::shallow_move(obj mm) const noexcept + DGlobalSymtab::shallow_move(obj gc) noexcept { - /** can't use std_copy_for because of non-copyable dp - * - * TODO: rename to shallow_move() throughout, and have std_copy_for() - * -> std_move_for() - * - **/ - - void * copy_mem = mm.alloc_copy_for(this); - - if (copy_mem) { - DGlobalSymtab * self = const_cast(this); - - return new (copy_mem) DGlobalSymtab(std::move(self->var_map_), vars_, - std::move(self->type_map_), types_); - } - - return nullptr; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DIfElseExpr.cpp b/xo-expression2/src/expression2/DIfElseExpr.cpp index 42d09fbb..3fb71682 100644 --- a/xo-expression2/src/expression2/DIfElseExpr.cpp +++ b/xo-expression2/src/expression2/DIfElseExpr.cpp @@ -89,14 +89,9 @@ namespace xo { } DIfElseExpr * - DIfElseExpr::shallow_move(obj mm) const noexcept + DIfElseExpr::shallow_move(obj gc) noexcept { - DIfElseExpr * copy = (DIfElseExpr *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DLambdaExpr.cpp b/xo-expression2/src/expression2/DLambdaExpr.cpp index ebec0d40..4919840b 100644 --- a/xo-expression2/src/expression2/DLambdaExpr.cpp +++ b/xo-expression2/src/expression2/DLambdaExpr.cpp @@ -140,14 +140,8 @@ namespace xo { } DLambdaExpr * - DLambdaExpr::shallow_move(obj mm) const noexcept { - DLambdaExpr * copy = (DLambdaExpr *)mm.alloc_copy((std::byte *)this); - - if (copy) { - *copy = *this; - } - - return copy; + DLambdaExpr::shallow_move(obj gc) noexcept { + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DLocalSymtab.cpp b/xo-expression2/src/expression2/DLocalSymtab.cpp index cf021038..d1c4930c 100644 --- a/xo-expression2/src/expression2/DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/DLocalSymtab.cpp @@ -119,9 +119,9 @@ namespace xo { } DLocalSymtab * - DLocalSymtab::shallow_move(obj mm) noexcept + DLocalSymtab::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DSequenceExpr.cpp b/xo-expression2/src/expression2/DSequenceExpr.cpp index 39dcc999..33149785 100644 --- a/xo-expression2/src/expression2/DSequenceExpr.cpp +++ b/xo-expression2/src/expression2/DSequenceExpr.cpp @@ -120,14 +120,9 @@ namespace xo { } DSequenceExpr * - DSequenceExpr::shallow_move(obj mm) const noexcept + DSequenceExpr::shallow_move(obj gc) noexcept { - DSequenceExpr * copy = (DSequenceExpr *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DTypename.cpp b/xo-expression2/src/expression2/DTypename.cpp index e02b483e..81509949 100644 --- a/xo-expression2/src/expression2/DTypename.cpp +++ b/xo-expression2/src/expression2/DTypename.cpp @@ -47,9 +47,9 @@ namespace xo { } DTypename * - DTypename::shallow_move(obj mm) noexcept + DTypename::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } size_t diff --git a/xo-expression2/src/expression2/DVarRef.cpp b/xo-expression2/src/expression2/DVarRef.cpp index e2866c23..186fa29a 100644 --- a/xo-expression2/src/expression2/DVarRef.cpp +++ b/xo-expression2/src/expression2/DVarRef.cpp @@ -65,14 +65,9 @@ namespace xo { } DVarRef * - DVarRef::shallow_move(obj mm) const noexcept + DVarRef::shallow_move(obj gc) noexcept { - DVarRef * copy = (DVarRef *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-expression2/src/expression2/DVariable.cpp b/xo-expression2/src/expression2/DVariable.cpp index 1b986c0b..f11000aa 100644 --- a/xo-expression2/src/expression2/DVariable.cpp +++ b/xo-expression2/src/expression2/DVariable.cpp @@ -45,15 +45,9 @@ namespace xo { } DVariable * - DVariable::shallow_move(obj mm) const noexcept + DVariable::shallow_move(obj gc) noexcept { - DVariable * copy = (DVariable *)mm.alloc_copy((std::byte *)this); - - if (copy) { - *copy = *this; - } - - return copy; + return gc.std_copy_for(this); } size_t diff --git a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp index 28375cce..2a731c0b 100644 --- a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DApplyExpr::shallow_move(DApplyExpr & self, obj mm) noexcept -> Opaque + IGCObject_DApplyExpr::shallow_move(DApplyExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DApplyExpr::forward_children(DApplyExpr & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DConstant.cpp b/xo-expression2/src/expression2/IGCObject_DConstant.cpp index dff013b1..ae5a701f 100644 --- a/xo-expression2/src/expression2/IGCObject_DConstant.cpp +++ b/xo-expression2/src/expression2/IGCObject_DConstant.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DConstant::shallow_move(DConstant & self, obj mm) noexcept -> Opaque + IGCObject_DConstant::shallow_move(DConstant & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DConstant::forward_children(DConstant & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp b/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp index 5adf8fc6..1e2c3bb8 100644 --- a/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DDefineExpr::shallow_move(DDefineExpr & self, obj mm) noexcept -> Opaque + IGCObject_DDefineExpr::shallow_move(DDefineExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DDefineExpr::forward_children(DDefineExpr & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp b/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp index 005e3ad3..3f596d01 100644 --- a/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DGlobalSymtab::shallow_move(DGlobalSymtab & self, obj mm) noexcept -> Opaque + IGCObject_DGlobalSymtab::shallow_move(DGlobalSymtab & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DGlobalSymtab::forward_children(DGlobalSymtab & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp b/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp index 9c28f2e0..240906f2 100644 --- a/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DIfElseExpr::shallow_move(DIfElseExpr & self, obj mm) noexcept -> Opaque + IGCObject_DIfElseExpr::shallow_move(DIfElseExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DIfElseExpr::forward_children(DIfElseExpr & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp b/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp index bfe386a2..c0a95847 100644 --- a/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DLambdaExpr::shallow_move(DLambdaExpr & self, obj mm) noexcept -> Opaque + IGCObject_DLambdaExpr::shallow_move(DLambdaExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DLambdaExpr::forward_children(DLambdaExpr & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp b/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp index 7078db9a..02941925 100644 --- a/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DLocalSymtab::shallow_move(DLocalSymtab & self, obj mm) noexcept -> Opaque + IGCObject_DLocalSymtab::shallow_move(DLocalSymtab & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DLocalSymtab::forward_children(DLocalSymtab & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp b/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp index 446a78bb..93af6f10 100644 --- a/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DSequenceExpr::shallow_move(DSequenceExpr & self, obj mm) noexcept -> Opaque + IGCObject_DSequenceExpr::shallow_move(DSequenceExpr & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DSequenceExpr::forward_children(DSequenceExpr & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DTypename.cpp b/xo-expression2/src/expression2/IGCObject_DTypename.cpp index 154a8b4a..58df5bff 100644 --- a/xo-expression2/src/expression2/IGCObject_DTypename.cpp +++ b/xo-expression2/src/expression2/IGCObject_DTypename.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DTypename::shallow_move(DTypename & self, obj mm) noexcept -> Opaque + IGCObject_DTypename::shallow_move(DTypename & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DTypename::forward_children(DTypename & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/IGCObject_DVarRef.cpp b/xo-expression2/src/expression2/IGCObject_DVarRef.cpp index b6b5e077..64967c9b 100644 --- a/xo-expression2/src/expression2/IGCObject_DVarRef.cpp +++ b/xo-expression2/src/expression2/IGCObject_DVarRef.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVarRef::shallow_move(DVarRef & self, obj mm) noexcept -> Opaque + IGCObject_DVarRef::shallow_move(DVarRef & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVarRef::forward_children(DVarRef & self, obj gc) noexcept -> size_type diff --git a/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp b/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp index 8a49292b..d418145c 100644 --- a/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp +++ b/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVariable::shallow_move(DVariable & self, obj mm) noexcept -> Opaque + IGCObject_DVariable::shallow_move(DVariable & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVariable::forward_children(DVariable & self, obj gc) noexcept -> size_type diff --git a/xo-gc/src/gc/GCObjectStore.cpp b/xo-gc/src/gc/GCObjectStore.cpp index 621a1548..4076fd90 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, gc->ref()); + void * to_dest = iface->shallow_move(from_src, gc->ref()); log && log(xtag("from_src", from_src), xtag("to_dest", to_dest)); log && log(xtag("tseq", info.tseq()), diff --git a/xo-interpreter2/include/xo/interpreter2/DClosure.hpp b/xo-interpreter2/include/xo/interpreter2/DClosure.hpp index aef74663..e57f6a1a 100644 --- a/xo-interpreter2/include/xo/interpreter2/DClosure.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DClosure.hpp @@ -58,7 +58,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DClosure * shallow_move(obj mm) const noexcept; + DClosure * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp index 76cac024..6ecd3eb6 100644 --- a/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DLocalEnv.hpp @@ -55,7 +55,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DLocalEnv * shallow_move(obj mm) const noexcept; + DLocalEnv * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp index 718c52b3..ae422cb1 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmApplyClosureFrame.hpp @@ -40,7 +40,7 @@ namespace xo { /** gcobject facet **/ std::size_t shallow_size() const noexcept; - DVsmApplyClosureFrame * shallow_move(obj mm) const noexcept; + DVsmApplyClosureFrame * shallow_move(obj gc) noexcept; std::size_t forward_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 d761cd18..99093f37 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmApplyFrame.hpp @@ -38,7 +38,7 @@ namespace xo { void assign_fn(obj x) { this->fn_ = x; } std::size_t shallow_size() const noexcept; - DVsmApplyFrame * shallow_move(obj mm) const noexcept; + DVsmApplyFrame * shallow_move(obj gc) noexcept; std::size_t forward_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 d128d357..0ad31cca 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp @@ -51,7 +51,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DVsmDefContFrame * shallow_move(obj mm) noexcept; + DVsmDefContFrame * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp index c389f214..a1903e94 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmEvalArgsFrame.hpp @@ -43,7 +43,7 @@ namespace xo { int32_t increment_arg() { return ++i_arg_; } std::size_t shallow_size() const noexcept; - DVsmEvalArgsFrame * shallow_move(obj mm) const noexcept; + DVsmEvalArgsFrame * shallow_move(obj gc) noexcept; std::size_t forward_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 09fcd076..3c438e51 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp @@ -51,7 +51,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DVsmIfElseContFrame * shallow_move(obj mm) noexcept; + DVsmIfElseContFrame * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp index 4692425b..959edfb0 100644 --- a/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/DVsmSeqContFrame.hpp @@ -56,7 +56,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DVsmSeqContFrame * shallow_move(obj mm) noexcept; + DVsmSeqContFrame * shallow_move(obj gc) noexcept; std::size_t forward_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 f4a7c4d1..4cb21afa 100644 --- a/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmDefContFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmDefContFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmDefContFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp index d5933283..86becbdf 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DClosure & self, obj mm) noexcept; + static Opaque shallow_move(DClosure & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DClosure & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp index ab9e223a..01bef341 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmApplyClosureFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmApplyClosureFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp index aa65d6e9..a3e0d31b 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmApplyFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmApplyFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmApplyFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp index 57d28ebe..42c26b03 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmEvalArgsFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmEvalArgsFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp index 7105768a..55064b27 100644 --- a/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DLocalEnv & self, obj mm) noexcept; + static Opaque shallow_move(DLocalEnv & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DLocalEnv & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp index 63e3ad2a..ab9a13c8 100644 --- a/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmIfElseContFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmIfElseContFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp index a657a217..d654d8a1 100644 --- a/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVsmSeqContFrame & self, obj mm) noexcept; + static Opaque shallow_move(DVsmSeqContFrame & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVsmSeqContFrame & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp b/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp index ecaac469..fa9a6929 100644 --- a/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp +++ b/xo-interpreter2/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp @@ -153,7 +153,7 @@ namespace xo { /** shallow copy during gc cycle. Not implemented! Only intending to support * VSM as virtual root **/ - DVirtualSchematikaMachine * shallow_move(obj mm) const noexcept; + DVirtualSchematikaMachine * 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 6f7c0eb8..71786a28 100644 --- a/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp +++ b/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DVirtualSchematikaMachine & self, obj mm) noexcept; + static Opaque shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVirtualSchematikaMachine & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/src/interpreter2/DClosure.cpp b/xo-interpreter2/src/interpreter2/DClosure.cpp index ed95334f..ca8f3bee 100644 --- a/xo-interpreter2/src/interpreter2/DClosure.cpp +++ b/xo-interpreter2/src/interpreter2/DClosure.cpp @@ -70,13 +70,8 @@ namespace xo { } DClosure * - DClosure::shallow_move(obj mm) const noexcept { - DClosure * copy = (DClosure *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + DClosure::shallow_move(obj gc) noexcept { + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DLocalEnv.cpp b/xo-interpreter2/src/interpreter2/DLocalEnv.cpp index 94f27422..a12200a0 100644 --- a/xo-interpreter2/src/interpreter2/DLocalEnv.cpp +++ b/xo-interpreter2/src/interpreter2/DLocalEnv.cpp @@ -97,13 +97,8 @@ namespace xo { } DLocalEnv * - DLocalEnv::shallow_move(obj mm) const noexcept { - DLocalEnv * copy = (DLocalEnv *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + DLocalEnv::shallow_move(obj gc) noexcept { + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp b/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp index a196363e..5ccb333c 100644 --- a/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp +++ b/xo-interpreter2/src/interpreter2/DVirtualSchematikaMachine.cpp @@ -954,11 +954,14 @@ namespace xo { } DVirtualSchematikaMachine * - DVirtualSchematikaMachine::shallow_move(obj mm) const noexcept + DVirtualSchematikaMachine::shallow_move(obj gc) noexcept { - (void)mm; + (void)gc; - /** not copyable (because SchematikaReader isn't) **/ + /** TODO: should be able to use gc.std_copy_for(this) now + * that shallow_move uses move construction. + * DVirtualSchematikaMachine is (or can be made) moveable. + **/ assert(false); diff --git a/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp index d2cfdb35..c7dca412 100644 --- a/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp @@ -39,15 +39,9 @@ namespace xo { } DVsmApplyClosureFrame * - DVsmApplyClosureFrame::shallow_move(obj mm) const noexcept + DVsmApplyClosureFrame::shallow_move(obj gc) noexcept { - DVsmApplyClosureFrame * copy - = (DVsmApplyClosureFrame *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp index 9a50c117..f51742f7 100644 --- a/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmApplyFrame.cpp @@ -47,14 +47,9 @@ namespace xo { } DVsmApplyFrame * - DVsmApplyFrame::shallow_move(obj mm) const noexcept + DVsmApplyFrame::shallow_move(obj gc) noexcept { - DVsmApplyFrame * copy = (DVsmApplyFrame *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp index d1f3e2b2..f3a8b35b 100644 --- a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp @@ -38,9 +38,9 @@ namespace xo { } DVsmDefContFrame * - DVsmDefContFrame::shallow_move(obj mm) noexcept + DVsmDefContFrame::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp index 0ff4ceb2..c487ae59 100644 --- a/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmEvalArgsFrame.cpp @@ -48,15 +48,9 @@ namespace xo { } DVsmEvalArgsFrame * - DVsmEvalArgsFrame::shallow_move(obj mm) const noexcept + DVsmEvalArgsFrame::shallow_move(obj gc) noexcept { - DVsmEvalArgsFrame * copy - = (DVsmEvalArgsFrame *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp index 075f7bd3..4978ff9c 100644 --- a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp @@ -36,9 +36,9 @@ namespace xo { } DVsmIfElseContFrame * - DVsmIfElseContFrame::shallow_move(obj mm) noexcept + DVsmIfElseContFrame::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp index d6160e8d..7ffea82e 100644 --- a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp @@ -39,9 +39,9 @@ namespace xo { } DVsmSeqContFrame * - DVsmSeqContFrame::shallow_move(obj mm) noexcept + DVsmSeqContFrame::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp index 33544907..99e834b8 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DClosure::shallow_move(DClosure & self, obj mm) noexcept -> Opaque + IGCObject_DClosure::shallow_move(DClosure & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DClosure::forward_children(DClosure & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp index 3aa994fd..a96ad2d7 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmApplyClosureFrame::shallow_move(DVsmApplyClosureFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmApplyClosureFrame::shallow_move(DVsmApplyClosureFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmApplyClosureFrame::forward_children(DVsmApplyClosureFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp index a1da32b8..9666fdec 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmApplyFrame::shallow_move(DVsmApplyFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmApplyFrame::shallow_move(DVsmApplyFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmApplyFrame::forward_children(DVsmApplyFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp index 02abd4cb..2acd7b24 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmDefContFrame::shallow_move(DVsmDefContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmDefContFrame::shallow_move(DVsmDefContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmDefContFrame::forward_children(DVsmDefContFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp index 8f33ece1..d1d6a0b6 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmEvalArgsFrame::shallow_move(DVsmEvalArgsFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmEvalArgsFrame::shallow_move(DVsmEvalArgsFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmEvalArgsFrame::forward_children(DVsmEvalArgsFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp index 939d7ce4..38f4881d 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmIfElseContFrame::shallow_move(DVsmIfElseContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmIfElseContFrame::shallow_move(DVsmIfElseContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmIfElseContFrame::forward_children(DVsmIfElseContFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp index 5d52ae74..3d57aaa1 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVsmSeqContFrame::shallow_move(DVsmSeqContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmSeqContFrame::shallow_move(DVsmSeqContFrame & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVsmSeqContFrame::forward_children(DVsmSeqContFrame & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp b/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp index 61e645f6..ed9f18fd 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DLocalEnv::shallow_move(DLocalEnv & self, obj mm) noexcept -> Opaque + IGCObject_DLocalEnv::shallow_move(DLocalEnv & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DLocalEnv::forward_children(DLocalEnv & self, obj gc) noexcept -> size_type diff --git a/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp b/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp index 354478ad..ddf77335 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DVirtualSchematikaMachine::shallow_move(DVirtualSchematikaMachine & self, obj mm) noexcept -> Opaque + IGCObject_DVirtualSchematikaMachine::shallow_move(DVirtualSchematikaMachine & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DVirtualSchematikaMachine::forward_children(DVirtualSchematikaMachine & self, obj gc) noexcept -> size_type diff --git a/xo-numeric/include/xo/numeric/detail/ANumeric.hpp b/xo-numeric/include/xo/numeric/detail/ANumeric.hpp index bda27456..7c8e0c99 100644 --- a/xo-numeric/include/xo/numeric/detail/ANumeric.hpp +++ b/xo-numeric/include/xo/numeric/detail/ANumeric.hpp @@ -42,6 +42,11 @@ public: /** @defgroup scm-numeric-methods **/ ///@{ // const methods + /** An uninitialized ANumeric instance will have zero vtable pointer (per {linux,osx} abi). + * Use case for this is narrow. We go to some lengths to avoid null vtable pointers. For example + * obj will have non-null vtable (via IFacet_Any) with all methods terminating. + **/ + bool _has_null_vptr() const noexcept { return *reinterpret_cast(this) == nullptr; } /** RTTI: unique id# for actual runtime data representation **/ virtual typeseq _typeseq() const noexcept = 0; /** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/ diff --git a/xo-numeric/include/xo/numeric/detail/RNumeric.hpp b/xo-numeric/include/xo/numeric/detail/RNumeric.hpp index 86cac666..35a704ec 100644 --- a/xo-numeric/include/xo/numeric/detail/RNumeric.hpp +++ b/xo-numeric/include/xo/numeric/detail/RNumeric.hpp @@ -46,6 +46,7 @@ public: ///@{ // explicit injected content + static obj multiply(obj lhs, obj rhs); // builtin methods typeseq _typeseq() const noexcept { return O::iface()->_typeseq(); } diff --git a/xo-object2/include/xo/object2/DArray.hpp b/xo-object2/include/xo/object2/DArray.hpp index 99d1b3d7..a455046d 100644 --- a/xo-object2/include/xo/object2/DArray.hpp +++ b/xo-object2/include/xo/object2/DArray.hpp @@ -148,7 +148,7 @@ namespace xo { /** shallow memory consumption. Excludes child objects **/ AAllocator::size_type shallow_size() const noexcept; /** return shallow copy of this array, using memory from @p mm **/ - DArray * shallow_move(obj mm) const noexcept; + DArray * shallow_move(obj gc) noexcept; /** forward elements to @p gc to-space; replace originals with forarding pointers **/ AAllocator::size_type forward_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DBoolean.hpp b/xo-object2/include/xo/object2/DBoolean.hpp index 34ffda16..31bf41b7 100644 --- a/xo-object2/include/xo/object2/DBoolean.hpp +++ b/xo-object2/include/xo/object2/DBoolean.hpp @@ -38,7 +38,7 @@ namespace xo { // GCObject facet std::size_t shallow_size() const noexcept; - DBoolean * shallow_move(obj mm) const noexcept; + DBoolean * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DDictionary.hpp b/xo-object2/include/xo/object2/DDictionary.hpp index 5e6ecaec..219e7838 100644 --- a/xo-object2/include/xo/object2/DDictionary.hpp +++ b/xo-object2/include/xo/object2/DDictionary.hpp @@ -203,7 +203,7 @@ namespace xo { /** shallow memory consumption. Excludes child objects **/ AAllocator::size_type shallow_size() const noexcept; /** return shallow copy of this array, using memory from @p mm **/ - DDictionary * shallow_move(obj mm) noexcept; + DDictionary * shallow_move(obj gc) noexcept; /** forward elements to @p gc to-space; replace originals with forarding pointers **/ AAllocator::size_type forward_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DFloat.hpp b/xo-object2/include/xo/object2/DFloat.hpp index b7d56e9c..949883ab 100644 --- a/xo-object2/include/xo/object2/DFloat.hpp +++ b/xo-object2/include/xo/object2/DFloat.hpp @@ -35,7 +35,7 @@ namespace xo { // GCObject facet std::size_t shallow_size() const noexcept; - DFloat * shallow_move(obj mm) const noexcept; + DFloat * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DInteger.hpp b/xo-object2/include/xo/object2/DInteger.hpp index 6a6194bf..d3969b75 100644 --- a/xo-object2/include/xo/object2/DInteger.hpp +++ b/xo-object2/include/xo/object2/DInteger.hpp @@ -40,7 +40,7 @@ namespace xo { // GCObject facet std::size_t shallow_size() const noexcept; - DInteger * shallow_move(obj mm) const noexcept; + DInteger * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; private: diff --git a/xo-object2/include/xo/object2/DList.hpp b/xo-object2/include/xo/object2/DList.hpp index 8fff47d5..199ec6e5 100644 --- a/xo-object2/include/xo/object2/DList.hpp +++ b/xo-object2/include/xo/object2/DList.hpp @@ -70,7 +70,7 @@ namespace xo { /** @defgroup xo-scm-list-gcobject-facet gcobject facet **/ ///@{ size_type shallow_size() const noexcept; - DList * shallow_move(obj mm) noexcept; + DList * shallow_move(obj gc) noexcept; size_type forward_children(obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/DRuntimeError.hpp b/xo-object2/include/xo/object2/DRuntimeError.hpp index 957c8481..2ee93061 100644 --- a/xo-object2/include/xo/object2/DRuntimeError.hpp +++ b/xo-object2/include/xo/object2/DRuntimeError.hpp @@ -50,7 +50,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DRuntimeError * shallow_move(obj mm) const noexcept; + DRuntimeError * shallow_move(obj gc) noexcept; std::size_t forward_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 ab8a85f1..58c202d7 100644 --- a/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp +++ b/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DArray & self, obj mm) noexcept; + static Opaque shallow_move(DArray & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DArray & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp b/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp index 5bc6e0c0..3ca03921 100644 --- a/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp +++ b/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DBoolean & self, obj mm) noexcept; + static Opaque shallow_move(DBoolean & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DBoolean & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp b/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp index 16fef8cb..b6da10c0 100644 --- a/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp +++ b/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DDictionary & self, obj mm) noexcept; + static Opaque shallow_move(DDictionary & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DDictionary & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp b/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp index 62cc6109..42e273ec 100644 --- a/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp +++ b/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DRuntimeError & self, obj mm) noexcept; + static Opaque shallow_move(DRuntimeError & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DRuntimeError & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/list/IGCObject_DList.hpp b/xo-object2/include/xo/object2/list/IGCObject_DList.hpp index 780ebda5..7218556a 100644 --- a/xo-object2/include/xo/object2/list/IGCObject_DList.hpp +++ b/xo-object2/include/xo/object2/list/IGCObject_DList.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DList & self, obj mm) noexcept; + static Opaque shallow_move(DList & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DList & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp b/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp index b25e4626..88d4d563 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp @@ -54,7 +54,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DFloat & self, obj mm) noexcept; + static Opaque shallow_move(DFloat & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DFloat & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp b/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp index a87f253a..822ec168 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DInteger & self, obj mm) noexcept; + static Opaque shallow_move(DInteger & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DInteger & self, obj gc) noexcept; ///@} diff --git a/xo-object2/src/object2/DArray.cpp b/xo-object2/src/object2/DArray.cpp index 2ae4ddc6..a70213f1 100644 --- a/xo-object2/src/object2/DArray.cpp +++ b/xo-object2/src/object2/DArray.cpp @@ -181,9 +181,12 @@ namespace xo { } DArray * - DArray::shallow_move(obj mm) const noexcept + DArray::shallow_move(obj gc) noexcept { - DArray * copy = (DArray *)mm.alloc_copy((std::byte *)this); + // note: not using gc.std_copy_for() here. + // flexible array -> compiler doesn't know actual DArray allocation size + + DArray * copy = (DArray *)gc.alloc_copy((std::byte *)this); if (copy) { copy->capacity_ = capacity_; diff --git a/xo-object2/src/object2/DBoolean.cpp b/xo-object2/src/object2/DBoolean.cpp index cb25f9e0..a8d5e85f 100644 --- a/xo-object2/src/object2/DBoolean.cpp +++ b/xo-object2/src/object2/DBoolean.cpp @@ -36,14 +36,9 @@ namespace xo { } DBoolean * - DBoolean::shallow_move(obj mm) const noexcept + DBoolean::shallow_move(obj gc) noexcept { - DBoolean * copy = (DBoolean *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } size_t diff --git a/xo-object2/src/object2/DDictionary.cpp b/xo-object2/src/object2/DDictionary.cpp index 739fcedc..2f25f1b7 100644 --- a/xo-object2/src/object2/DDictionary.cpp +++ b/xo-object2/src/object2/DDictionary.cpp @@ -274,9 +274,9 @@ namespace xo { } DDictionary * - DDictionary::shallow_move(obj mm) noexcept + DDictionary::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-object2/src/object2/DFloat.cpp b/xo-object2/src/object2/DFloat.cpp index f7f8ff3e..4a9041c0 100644 --- a/xo-object2/src/object2/DFloat.cpp +++ b/xo-object2/src/object2/DFloat.cpp @@ -34,14 +34,9 @@ namespace xo { } DFloat * - DFloat::shallow_move(obj mm) const noexcept + DFloat::shallow_move(obj gc) noexcept { - DFloat * copy = (DFloat *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } size_t diff --git a/xo-object2/src/object2/DInteger.cpp b/xo-object2/src/object2/DInteger.cpp index 7cbcedf0..600f48ec 100644 --- a/xo-object2/src/object2/DInteger.cpp +++ b/xo-object2/src/object2/DInteger.cpp @@ -34,14 +34,9 @@ namespace xo { } DInteger * - DInteger::shallow_move(obj mm) const noexcept + DInteger::shallow_move(obj gc) noexcept { - DInteger * copy = (DInteger *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } size_t diff --git a/xo-object2/src/object2/DList.cpp b/xo-object2/src/object2/DList.cpp index be869073..f17a53f4 100644 --- a/xo-object2/src/object2/DList.cpp +++ b/xo-object2/src/object2/DList.cpp @@ -185,9 +185,9 @@ namespace xo { } DList * - DList::shallow_move(obj mm) noexcept + DList::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } auto diff --git a/xo-object2/src/object2/DRuntimeError.cpp b/xo-object2/src/object2/DRuntimeError.cpp index 1f34596b..a52e1df9 100644 --- a/xo-object2/src/object2/DRuntimeError.cpp +++ b/xo-object2/src/object2/DRuntimeError.cpp @@ -59,14 +59,9 @@ namespace xo { } DRuntimeError * - DRuntimeError::shallow_move(obj mm) const noexcept + DRuntimeError::shallow_move(obj gc) noexcept { - DRuntimeError * copy = (DRuntimeError *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return gc.std_copy_for(this); } std::size_t diff --git a/xo-object2/src/object2/IGCObject_DArray.cpp b/xo-object2/src/object2/IGCObject_DArray.cpp index 7cde63e1..e4fa31c7 100644 --- a/xo-object2/src/object2/IGCObject_DArray.cpp +++ b/xo-object2/src/object2/IGCObject_DArray.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DArray::shallow_move(DArray & self, obj mm) noexcept -> Opaque + IGCObject_DArray::shallow_move(DArray & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DArray::forward_children(DArray & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DBoolean.cpp b/xo-object2/src/object2/IGCObject_DBoolean.cpp index ef503af9..2aed50e3 100644 --- a/xo-object2/src/object2/IGCObject_DBoolean.cpp +++ b/xo-object2/src/object2/IGCObject_DBoolean.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DBoolean::shallow_move(DBoolean & self, obj mm) noexcept -> Opaque + IGCObject_DBoolean::shallow_move(DBoolean & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DBoolean::forward_children(DBoolean & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DDictionary.cpp b/xo-object2/src/object2/IGCObject_DDictionary.cpp index 9d4bae65..e8f291aa 100644 --- a/xo-object2/src/object2/IGCObject_DDictionary.cpp +++ b/xo-object2/src/object2/IGCObject_DDictionary.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DDictionary::shallow_move(DDictionary & self, obj mm) noexcept -> Opaque + IGCObject_DDictionary::shallow_move(DDictionary & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DDictionary::forward_children(DDictionary & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DFloat.cpp b/xo-object2/src/object2/IGCObject_DFloat.cpp index a22a1b2f..7625cacb 100644 --- a/xo-object2/src/object2/IGCObject_DFloat.cpp +++ b/xo-object2/src/object2/IGCObject_DFloat.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DFloat::shallow_move(DFloat & self, obj mm) noexcept -> Opaque + IGCObject_DFloat::shallow_move(DFloat & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DFloat::forward_children(DFloat & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DInteger.cpp b/xo-object2/src/object2/IGCObject_DInteger.cpp index 4f74e5fe..9bb9bbf3 100644 --- a/xo-object2/src/object2/IGCObject_DInteger.cpp +++ b/xo-object2/src/object2/IGCObject_DInteger.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DInteger::shallow_move(DInteger & self, obj mm) noexcept -> Opaque + IGCObject_DInteger::shallow_move(DInteger & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DInteger::forward_children(DInteger & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DList.cpp b/xo-object2/src/object2/IGCObject_DList.cpp index 2512cc32..cbe8b71e 100644 --- a/xo-object2/src/object2/IGCObject_DList.cpp +++ b/xo-object2/src/object2/IGCObject_DList.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DList::shallow_move(DList & self, obj mm) noexcept -> Opaque + IGCObject_DList::shallow_move(DList & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DList::forward_children(DList & self, obj gc) noexcept -> size_type diff --git a/xo-object2/src/object2/IGCObject_DRuntimeError.cpp b/xo-object2/src/object2/IGCObject_DRuntimeError.cpp index cc755821..6917af76 100644 --- a/xo-object2/src/object2/IGCObject_DRuntimeError.cpp +++ b/xo-object2/src/object2/IGCObject_DRuntimeError.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DRuntimeError::shallow_move(DRuntimeError & self, obj mm) noexcept -> Opaque + IGCObject_DRuntimeError::shallow_move(DRuntimeError & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DRuntimeError::forward_children(DRuntimeError & self, obj gc) noexcept -> size_type diff --git a/xo-procedure2/include/xo/procedure2/DPrimitive.hpp b/xo-procedure2/include/xo/procedure2/DPrimitive.hpp index f602ebb6..d55e01ee 100644 --- a/xo-procedure2/include/xo/procedure2/DPrimitive.hpp +++ b/xo-procedure2/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/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp b/xo-procedure2/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp index cecc298c..53c073a4 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 @@ -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/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 ac5c4f51..e2dd6381 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 @@ -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/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 772aabb3..c21ab140 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 @@ -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/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 266d1f42..b35e1004 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 @@ -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/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 7abc1367..d0e23e33 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 @@ -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/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp index 948d1d60..2e0198f5 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp +++ b/xo-procedure2/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/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_1_gco.cpp index b5c1754b..2612c887 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 @@ -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/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 7c58550a..6173f6ca 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 @@ -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/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 347295b3..ab7cc1be 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 @@ -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/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 26a9f3fd..4134581c 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 @@ -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 diff --git a/xo-reader2/include/xo/reader2/DGlobalEnv.hpp b/xo-reader2/include/xo/reader2/DGlobalEnv.hpp index 0c1536ee..96cd5771 100644 --- a/xo-reader2/include/xo/reader2/DGlobalEnv.hpp +++ b/xo-reader2/include/xo/reader2/DGlobalEnv.hpp @@ -71,7 +71,7 @@ namespace xo { ///@{ std::size_t shallow_size() const noexcept; - DGlobalEnv * shallow_move(obj mm) noexcept; + DGlobalEnv * shallow_move(obj gc) noexcept; std::size_t forward_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 f8ff90b7..6018a662 100644 --- a/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp +++ b/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DGlobalEnv & self, obj mm) noexcept; + static Opaque shallow_move(DGlobalEnv & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DGlobalEnv & self, obj gc) noexcept; ///@} diff --git a/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp b/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp index da6862ab..07c85e4f 100644 --- a/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp +++ b/xo-reader2/include/xo/reader2/parser/DSchematikaParser.hpp @@ -294,7 +294,7 @@ namespace xo { std::size_t shallow_size() const noexcept; /** not implemented (SchematikaParser not designed to be copyable) **/ - DSchematikaParser * shallow_move(obj mm) const noexcept; + DSchematikaParser * shallow_move(obj gc) noexcept; /** forward gc-aware children **/ std::size_t forward_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 e6fc39d9..f743e5cb 100644 --- a/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp +++ b/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DSchematikaParser & self, obj mm) noexcept; + static Opaque shallow_move(DSchematikaParser & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DSchematikaParser & self, obj gc) noexcept; ///@} diff --git a/xo-reader2/src/reader2/DGlobalEnv.cpp b/xo-reader2/src/reader2/DGlobalEnv.cpp index 17a86798..243fc8d6 100644 --- a/xo-reader2/src/reader2/DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/DGlobalEnv.cpp @@ -114,9 +114,9 @@ namespace xo { } DGlobalEnv * - DGlobalEnv::shallow_move(obj mm) noexcept + DGlobalEnv::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-reader2/src/reader2/DSchematikaParser.cpp b/xo-reader2/src/reader2/DSchematikaParser.cpp index f26fe62a..35edc124 100644 --- a/xo-reader2/src/reader2/DSchematikaParser.cpp +++ b/xo-reader2/src/reader2/DSchematikaParser.cpp @@ -191,10 +191,13 @@ namespace xo { } DSchematikaParser * - DSchematikaParser::shallow_move(obj mm) const noexcept + DSchematikaParser::shallow_move(obj gc) noexcept { - (void)mm; + (void)gc; + /** TODO: may be feasible to use gc.std_copy_for(this) + * if/when DSchematikaParser is moveable + **/ assert(false); return nullptr; } diff --git a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp index f8edbb58..b31cadf6 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DGlobalEnv::shallow_move(DGlobalEnv & self, obj mm) noexcept -> Opaque + IGCObject_DGlobalEnv::shallow_move(DGlobalEnv & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DGlobalEnv::forward_children(DGlobalEnv & self, obj gc) noexcept -> size_type diff --git a/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp b/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp index 8ba2349c..72c9d0e2 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DSchematikaParser::shallow_move(DSchematikaParser & self, obj mm) noexcept -> Opaque + IGCObject_DSchematikaParser::shallow_move(DSchematikaParser & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DSchematikaParser::forward_children(DSchematikaParser & self, obj gc) noexcept -> size_type diff --git a/xo-stringtable2/include/xo/stringtable2/DString.hpp b/xo-stringtable2/include/xo/stringtable2/DString.hpp index bfcd30fa..cdb362d2 100644 --- a/xo-stringtable2/include/xo/stringtable2/DString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/DString.hpp @@ -245,7 +245,7 @@ namespace xo { size_type shallow_size() const noexcept; /** clone string, using memory from allocator @p mm **/ - DString * shallow_move(obj mm) const noexcept; + DString * shallow_move(obj gc) noexcept; size_type forward_children(obj gc) noexcept; /** fixup child pointers (trivial for DString, no children) diff --git a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp index d5b75626..c939f615 100644 --- a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp @@ -91,7 +91,7 @@ namespace xo { std::size_t shallow_size() const noexcept; /** clone unique string, using memory from allocator @p mm. **/ - DUniqueString * shallow_move(obj mm) const noexcept; + DUniqueString * shallow_move(obj gc) noexcept; /** fixup child pointers (trivial for DUniqueString, no gc-owned children **/ std::size_t forward_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 6dc2ad1e..c4a71a50 100644 --- a/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DString & self, obj mm) noexcept; + static Opaque shallow_move(DString & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DString & self, obj gc) noexcept; ///@} diff --git a/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp b/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp index 1d6b8db8..27bc8252 100644 --- a/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp @@ -55,7 +55,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DUniqueString & self, obj mm) noexcept; + static Opaque shallow_move(DUniqueString & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DUniqueString & self, obj gc) noexcept; ///@} diff --git a/xo-stringtable2/src/stringtable2/DString.cpp b/xo-stringtable2/src/stringtable2/DString.cpp index f04db7f4..81f7780c 100644 --- a/xo-stringtable2/src/stringtable2/DString.cpp +++ b/xo-stringtable2/src/stringtable2/DString.cpp @@ -156,9 +156,12 @@ namespace xo { } DString * - DString::shallow_move(obj mm) const noexcept + DString::shallow_move(obj gc) noexcept { - DString * copy = (DString *)mm.alloc_copy((std::byte *)this); + // note: not using gc.std_copy_for() here + // b/c DString flexible array means not move-constructible + + DString * copy = (DString *)gc.alloc_copy_for(this); if (copy) { copy->capacity_ = capacity_; diff --git a/xo-stringtable2/src/stringtable2/DUniqueString.cpp b/xo-stringtable2/src/stringtable2/DUniqueString.cpp index dcf7cc53..057ee1f3 100644 --- a/xo-stringtable2/src/stringtable2/DUniqueString.cpp +++ b/xo-stringtable2/src/stringtable2/DUniqueString.cpp @@ -88,12 +88,16 @@ namespace xo { } DUniqueString * - DUniqueString::shallow_move(obj mm) const noexcept + DUniqueString::shallow_move(obj gc) noexcept { // well-posed, but not expected to be used. + // + // Not using gc.std_copy_for() here because compiler doesn't know + // actual alloc size of a DUniqueString instance + assert(false); - DUniqueString * copy = (DUniqueString *)mm.alloc_copy((std::byte *)this); + DUniqueString * copy = (DUniqueString *)gc.alloc_copy((std::byte *)this); if (copy) { // Copy assignment not implemented in general diff --git a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp index c3f6503a..01fc837c 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DString::shallow_move(DString & self, obj mm) noexcept -> Opaque + IGCObject_DString::shallow_move(DString & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DString::forward_children(DString & self, obj gc) noexcept -> size_type diff --git a/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp b/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp index 034b9664..82e7c657 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DUniqueString::shallow_move(DUniqueString & self, obj mm) noexcept -> Opaque + IGCObject_DUniqueString::shallow_move(DUniqueString & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DUniqueString::forward_children(DUniqueString & self, obj gc) noexcept -> size_type diff --git a/xo-type/include/xo/type/DArrayType.hpp b/xo-type/include/xo/type/DArrayType.hpp index a2594649..db827e80 100644 --- a/xo-type/include/xo/type/DArrayType.hpp +++ b/xo-type/include/xo/type/DArrayType.hpp @@ -42,7 +42,7 @@ namespace xo { /** @defgroup xo-scm-arraytype-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - DArrayType * shallow_move(obj mm) noexcept; + DArrayType * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DAtomicType.hpp b/xo-type/include/xo/type/DAtomicType.hpp index 7661955c..b9daf767 100644 --- a/xo-type/include/xo/type/DAtomicType.hpp +++ b/xo-type/include/xo/type/DAtomicType.hpp @@ -43,7 +43,7 @@ namespace xo { /** @defgroup xo-scm-atomictype-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - DAtomicType * shallow_move(obj mm) noexcept; + DAtomicType * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DFunctionType.hpp b/xo-type/include/xo/type/DFunctionType.hpp index 328c93b3..5fbb93a7 100644 --- a/xo-type/include/xo/type/DFunctionType.hpp +++ b/xo-type/include/xo/type/DFunctionType.hpp @@ -64,7 +64,7 @@ namespace xo { /** @defgroup xo-scm-arraytype-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - DFunctionType * shallow_move(obj mm) noexcept; + DFunctionType * shallow_move(obj gc) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/DListType.hpp b/xo-type/include/xo/type/DListType.hpp index 2dfedb27..b2fd196b 100644 --- a/xo-type/include/xo/type/DListType.hpp +++ b/xo-type/include/xo/type/DListType.hpp @@ -50,7 +50,7 @@ namespace xo { /** @defgroup xo-scm-listtype-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - DListType * shallow_move(obj mm) noexcept; + DListType * shallow_move(obj gc) noexcept; std::size_t forward_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 8c1bfeee..55c58b55 100644 --- a/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp +++ b/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DArrayType & self, obj mm) noexcept; + static Opaque shallow_move(DArrayType & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DArrayType & self, obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp b/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp index 00763e4a..6907e7cb 100644 --- a/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp +++ b/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DAtomicType & self, obj mm) noexcept; + static Opaque shallow_move(DAtomicType & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DAtomicType & self, obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp b/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp index 9c8727cd..f43b41ee 100644 --- a/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp +++ b/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DFunctionType & self, obj mm) noexcept; + static Opaque shallow_move(DFunctionType & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DFunctionType & self, obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/list/IGCObject_DListType.hpp b/xo-type/include/xo/type/list/IGCObject_DListType.hpp index 2459fff4..296779e9 100644 --- a/xo-type/include/xo/type/list/IGCObject_DListType.hpp +++ b/xo-type/include/xo/type/list/IGCObject_DListType.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DListType & self, obj mm) noexcept; + static Opaque shallow_move(DListType & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DListType & self, obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/typevar/DTypeVarRef.hpp b/xo-type/include/xo/type/typevar/DTypeVarRef.hpp index 4ce9a667..f59f3f72 100644 --- a/xo-type/include/xo/type/typevar/DTypeVarRef.hpp +++ b/xo-type/include/xo/type/typevar/DTypeVarRef.hpp @@ -54,7 +54,7 @@ namespace xo { /** @defgroup xo-scm-atomictype-gcobject-facet **/ ///@{ std::size_t shallow_size() const noexcept; - DTypeVarRef * shallow_move(obj mm) noexcept; + DTypeVarRef * shallow_move(obj gc) noexcept; std::size_t forward_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 d0250871..e491cc35 100644 --- a/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp +++ b/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp @@ -53,7 +53,7 @@ namespace xo { // non-const methods /** move instance using allocator **/ - static Opaque shallow_move(DTypeVarRef & self, obj mm) noexcept; + static Opaque shallow_move(DTypeVarRef & self, obj gc) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DTypeVarRef & self, obj gc) noexcept; ///@} diff --git a/xo-type/src/type/DArrayType.cpp b/xo-type/src/type/DArrayType.cpp index b7c628af..52d25f5a 100644 --- a/xo-type/src/type/DArrayType.cpp +++ b/xo-type/src/type/DArrayType.cpp @@ -83,9 +83,9 @@ namespace xo { } DArrayType * - DArrayType::shallow_move(obj mm) noexcept + DArrayType::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-type/src/type/DAtomicType.cpp b/xo-type/src/type/DAtomicType.cpp index f25a159e..d4f0b166 100644 --- a/xo-type/src/type/DAtomicType.cpp +++ b/xo-type/src/type/DAtomicType.cpp @@ -61,9 +61,9 @@ namespace xo { } DAtomicType * - DAtomicType::shallow_move(obj mm) noexcept + DAtomicType::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-type/src/type/DFunctionType.cpp b/xo-type/src/type/DFunctionType.cpp index f9ac920e..8cb9001b 100644 --- a/xo-type/src/type/DFunctionType.cpp +++ b/xo-type/src/type/DFunctionType.cpp @@ -94,9 +94,9 @@ namespace xo { } DFunctionType * - DFunctionType::shallow_move(obj mm) noexcept + DFunctionType::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-type/src/type/DListType.cpp b/xo-type/src/type/DListType.cpp index 2906053d..487cc5fe 100644 --- a/xo-type/src/type/DListType.cpp +++ b/xo-type/src/type/DListType.cpp @@ -88,9 +88,9 @@ namespace xo { } DListType * - DListType::shallow_move(obj mm) noexcept + DListType::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-type/src/type/DTypeVarRef.cpp b/xo-type/src/type/DTypeVarRef.cpp index d618a2f2..a712174f 100644 --- a/xo-type/src/type/DTypeVarRef.cpp +++ b/xo-type/src/type/DTypeVarRef.cpp @@ -82,9 +82,9 @@ namespace xo { } DTypeVarRef * - DTypeVarRef::shallow_move(obj mm) noexcept + DTypeVarRef::shallow_move(obj gc) noexcept { - return mm.std_copy_for(this); + return gc.std_copy_for(this); } std::size_t diff --git a/xo-type/src/type/IGCObject_DArrayType.cpp b/xo-type/src/type/IGCObject_DArrayType.cpp index c9375805..34319c27 100644 --- a/xo-type/src/type/IGCObject_DArrayType.cpp +++ b/xo-type/src/type/IGCObject_DArrayType.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DArrayType::shallow_move(DArrayType & self, obj mm) noexcept -> Opaque + IGCObject_DArrayType::shallow_move(DArrayType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DArrayType::forward_children(DArrayType & self, obj gc) noexcept -> size_type diff --git a/xo-type/src/type/IGCObject_DAtomicType.cpp b/xo-type/src/type/IGCObject_DAtomicType.cpp index 3916d761..a0a92816 100644 --- a/xo-type/src/type/IGCObject_DAtomicType.cpp +++ b/xo-type/src/type/IGCObject_DAtomicType.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DAtomicType::shallow_move(DAtomicType & self, obj mm) noexcept -> Opaque + IGCObject_DAtomicType::shallow_move(DAtomicType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DAtomicType::forward_children(DAtomicType & self, obj gc) noexcept -> size_type diff --git a/xo-type/src/type/IGCObject_DFunctionType.cpp b/xo-type/src/type/IGCObject_DFunctionType.cpp index 4c7c7c13..04e57607 100644 --- a/xo-type/src/type/IGCObject_DFunctionType.cpp +++ b/xo-type/src/type/IGCObject_DFunctionType.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DFunctionType::shallow_move(DFunctionType & self, obj mm) noexcept -> Opaque + IGCObject_DFunctionType::shallow_move(DFunctionType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DFunctionType::forward_children(DFunctionType & self, obj gc) noexcept -> size_type diff --git a/xo-type/src/type/IGCObject_DListType.cpp b/xo-type/src/type/IGCObject_DListType.cpp index ff3820d0..fe721a34 100644 --- a/xo-type/src/type/IGCObject_DListType.cpp +++ b/xo-type/src/type/IGCObject_DListType.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DListType::shallow_move(DListType & self, obj mm) noexcept -> Opaque + IGCObject_DListType::shallow_move(DListType & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DListType::forward_children(DListType & self, obj gc) noexcept -> size_type diff --git a/xo-type/src/type/IGCObject_DTypeVarRef.cpp b/xo-type/src/type/IGCObject_DTypeVarRef.cpp index 9dc58dc0..f4f5d595 100644 --- a/xo-type/src/type/IGCObject_DTypeVarRef.cpp +++ b/xo-type/src/type/IGCObject_DTypeVarRef.cpp @@ -22,9 +22,9 @@ namespace xo { } auto - IGCObject_DTypeVarRef::shallow_move(DTypeVarRef & self, obj mm) noexcept -> Opaque + IGCObject_DTypeVarRef::shallow_move(DTypeVarRef & self, obj gc) noexcept -> Opaque { - return self.shallow_move(mm); + return self.shallow_move(gc); } auto IGCObject_DTypeVarRef::forward_children(DTypeVarRef & self, obj gc) noexcept -> size_type