diff --git a/xo-alloc2/idl/GCObject.json5 b/xo-alloc2/idl/GCObject.json5 index 0bbb170d..cbc2ab7e 100644 --- a/xo-alloc2/idl/GCObject.json5 +++ b/xo-alloc2/idl/GCObject.json5 @@ -54,7 +54,9 @@ noexcept: true, attributes: [], }, - // Opaque shallow_copy(obj>) const noexcept + ], + nonconst_methods: [ + // Opaque shallow_copy(obj>) noexcept { name: "shallow_copy", doc: ["copy instance using allocator"], @@ -66,9 +68,7 @@ noexcept: true, attributes: [], }, - ], - nonconst_methods: [ - // size_type forward_children(obj) const noexcept + // size_type forward_children(obj) noexcept { name: "forward_children", doc: ["during GC: forward immdiate children"], diff --git a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp index 1037f253..e9a4e519 100644 --- a/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/AGCObject.hpp @@ -64,10 +64,10 @@ public: virtual void _drop(Opaque d) const noexcept = 0; /** memory consumption for this instance **/ virtual size_type shallow_size(Copaque data) const noexcept = 0; - /** copy instance using allocator **/ - virtual Opaque shallow_copy(Copaque data, obj mm) const noexcept = 0; // nonconst methods + /** copy instance using allocator **/ + virtual Opaque shallow_copy(Opaque data, obj mm) 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 9ff7bb2e..2658c599 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Any.hpp @@ -62,9 +62,9 @@ namespace mm { // const methods [[noreturn]] size_type shallow_size(Copaque) const noexcept override { _fatal(); } - [[noreturn]] Opaque shallow_copy(Copaque, obj) const noexcept override { _fatal(); } // nonconst methods + [[noreturn]] Opaque shallow_copy(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 12010edf..e00595e8 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IGCObject_Xfer.hpp @@ -52,11 +52,11 @@ namespace mm { size_type shallow_size(Copaque data) const noexcept override { return I::shallow_size(_dcast(data)); } - Opaque shallow_copy(Copaque data, obj mm) const noexcept override { - return I::shallow_copy(_dcast(data), mm); - } // non-const methods + Opaque shallow_copy(Opaque data, obj mm) const noexcept override { + return I::shallow_copy(_dcast(data), mm); + } 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/RGCObject.hpp b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp index d24994a8..c4a668e6 100644 --- a/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/RGCObject.hpp @@ -58,11 +58,11 @@ public: size_type shallow_size() const noexcept { return O::iface()->shallow_size(O::data()); } - Opaque shallow_copy(obj mm) const noexcept { - return O::iface()->shallow_copy(O::data(), mm); - } // non-const methods (still const in router!) + Opaque shallow_copy(obj mm) noexcept { + return O::iface()->shallow_copy(O::data(), mm); + } 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 10ff8f6a..426f68a9 100644 --- a/xo-alloc2/src/alloc2/IGCObject_Any.cpp +++ b/xo-alloc2/src/alloc2/IGCObject_Any.cpp @@ -35,6 +35,12 @@ IGCObject_Any::_valid // nonconst methods +auto +IGCObject_Any::shallow_copy(Opaque, obj) const noexcept -> Opaque +{ + _fatal(); +} + auto IGCObject_Any::forward_children(Opaque, obj) const noexcept -> size_type { diff --git a/xo-expression2/include/xo/expression2/DDefineExpr.hpp b/xo-expression2/include/xo/expression2/DDefineExpr.hpp index 6ad8494f..34a4baa5 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_copy(obj mm) const noexcept; + DDefineExpr * shallow_copy(obj mm) 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 c5de7878..0d32472b 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_copy(obj mm) const noexcept; + DLocalSymtab * shallow_copy(obj mm) 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 1d9d0629..eeee5dbb 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_copy(obj mm) const noexcept; + DTypename * shallow_copy(obj mm) 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 8e516773..cf4e3062 100644 --- a/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp +++ b/xo-expression2/include/xo/expression2/define/IGCObject_DDefineExpr.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DDefineExpr & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DDefineExpr & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DDefineExpr & self, obj mm) 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/AExpression.hpp b/xo-expression2/include/xo/expression2/detail/AExpression.hpp index 96d68a65..e615fb46 100644 --- a/xo-expression2/include/xo/expression2/detail/AExpression.hpp +++ b/xo-expression2/include/xo/expression2/detail/AExpression.hpp @@ -48,6 +48,11 @@ public: /** @defgroup scm-expression-methods **/ ///@{ // const methods + /** An uninitialized AExpression 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-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp index effcd01c..a1675363 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DApplyExpr & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DApplyExpr & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DApplyExpr & self, obj mm) 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 608d4d6a..68404957 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DConstant.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DConstant & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DConstant & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DConstant & self, obj mm) 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 63fdb6ee..1e1fcca5 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DIfElseExpr & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DIfElseExpr & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DIfElseExpr & self, obj mm) 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 91bb24da..f33e9ed7 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DLambdaExpr & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DLambdaExpr & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DLambdaExpr & self, obj mm) 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 20d21159..7648aab3 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DSequenceExpr & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DSequenceExpr & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DSequenceExpr & self, obj mm) 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 228e74c0..c5ca5f19 100644 --- a/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp +++ b/xo-expression2/include/xo/expression2/detail/IGCObject_DVarRef.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVarRef & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVarRef & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVarRef & self, obj mm) 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/ASymbolTable.hpp b/xo-expression2/include/xo/expression2/symtab/ASymbolTable.hpp index 59cf246f..40349861 100644 --- a/xo-expression2/include/xo/expression2/symtab/ASymbolTable.hpp +++ b/xo-expression2/include/xo/expression2/symtab/ASymbolTable.hpp @@ -45,6 +45,11 @@ public: /** @defgroup scm-symboltable-methods **/ ///@{ // const methods + /** An uninitialized ASymbolTable 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-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp index fe487e1a..cf444eb8 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DGlobalSymtab & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DGlobalSymtab & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DGlobalSymtab & self, obj mm) 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 6c0ec0c7..d91f214a 100644 --- a/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp +++ b/xo-expression2/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DLocalSymtab & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DLocalSymtab & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DLocalSymtab & self, obj mm) 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 f01740d4..d2302a6f 100644 --- a/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp +++ b/xo-expression2/include/xo/expression2/typename/IGCObject_DTypename.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DTypename & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DTypename & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DTypename & self, obj mm) 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 0b23f630..1bdb2a0f 100644 --- a/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp +++ b/xo-expression2/include/xo/expression2/variable/IGCObject_DVariable.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVariable & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVariable & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVariable & self, obj mm) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVariable & self, obj gc) noexcept; ///@} diff --git a/xo-expression2/src/expression2/DDefineExpr.cpp b/xo-expression2/src/expression2/DDefineExpr.cpp index aa1ea105..e5ec63b0 100644 --- a/xo-expression2/src/expression2/DDefineExpr.cpp +++ b/xo-expression2/src/expression2/DDefineExpr.cpp @@ -85,7 +85,7 @@ namespace xo { } DDefineExpr * - DDefineExpr::shallow_copy(obj mm) const noexcept + DDefineExpr::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-expression2/src/expression2/DLocalSymtab.cpp b/xo-expression2/src/expression2/DLocalSymtab.cpp index 539d5d78..14dd9262 100644 --- a/xo-expression2/src/expression2/DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/DLocalSymtab.cpp @@ -119,7 +119,7 @@ namespace xo { } DLocalSymtab * - DLocalSymtab::shallow_copy(obj mm) const noexcept + DLocalSymtab::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-expression2/src/expression2/DTypename.cpp b/xo-expression2/src/expression2/DTypename.cpp index fd62336b..36c9e74f 100644 --- a/xo-expression2/src/expression2/DTypename.cpp +++ b/xo-expression2/src/expression2/DTypename.cpp @@ -47,7 +47,7 @@ namespace xo { } DTypename * - DTypename::shallow_copy(obj mm) const noexcept + DTypename::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp index ad6571e0..fe587a2d 100644 --- a/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DApplyExpr.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DApplyExpr::shallow_copy(const DApplyExpr & self, obj mm) noexcept -> Opaque + IGCObject_DApplyExpr::shallow_copy(DApplyExpr & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 ea3be262..73453419 100644 --- a/xo-expression2/src/expression2/IGCObject_DConstant.cpp +++ b/xo-expression2/src/expression2/IGCObject_DConstant.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DConstant::shallow_copy(const DConstant & self, obj mm) noexcept -> Opaque + IGCObject_DConstant::shallow_copy(DConstant & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 eb43932b..ffbd4bc8 100644 --- a/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DDefineExpr.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DDefineExpr::shallow_copy(const DDefineExpr & self, obj mm) noexcept -> Opaque + IGCObject_DDefineExpr::shallow_copy(DDefineExpr & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 d59e6bbf..f88060cb 100644 --- a/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DGlobalSymtab.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DGlobalSymtab::shallow_copy(const DGlobalSymtab & self, obj mm) noexcept -> Opaque + IGCObject_DGlobalSymtab::shallow_copy(DGlobalSymtab & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 8a0f03d5..a861dbc4 100644 --- a/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DIfElseExpr.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DIfElseExpr::shallow_copy(const DIfElseExpr & self, obj mm) noexcept -> Opaque + IGCObject_DIfElseExpr::shallow_copy(DIfElseExpr & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 c7724cd5..be64dab3 100644 --- a/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLambdaExpr.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DLambdaExpr::shallow_copy(const DLambdaExpr & self, obj mm) noexcept -> Opaque + IGCObject_DLambdaExpr::shallow_copy(DLambdaExpr & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 ca96d3b6..eb3e06c3 100644 --- a/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp +++ b/xo-expression2/src/expression2/IGCObject_DLocalSymtab.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DLocalSymtab::shallow_copy(const DLocalSymtab & self, obj mm) noexcept -> Opaque + IGCObject_DLocalSymtab::shallow_copy(DLocalSymtab & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 54ad1bd5..bbcf9084 100644 --- a/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp +++ b/xo-expression2/src/expression2/IGCObject_DSequenceExpr.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DSequenceExpr::shallow_copy(const DSequenceExpr & self, obj mm) noexcept -> Opaque + IGCObject_DSequenceExpr::shallow_copy(DSequenceExpr & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 2b898fbf..f9c40e81 100644 --- a/xo-expression2/src/expression2/IGCObject_DTypename.cpp +++ b/xo-expression2/src/expression2/IGCObject_DTypename.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DTypename::shallow_copy(const DTypename & self, obj mm) noexcept -> Opaque + IGCObject_DTypename::shallow_copy(DTypename & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 61596baa..788e0a00 100644 --- a/xo-expression2/src/expression2/IGCObject_DVarRef.cpp +++ b/xo-expression2/src/expression2/IGCObject_DVarRef.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVarRef::shallow_copy(const DVarRef & self, obj mm) noexcept -> Opaque + IGCObject_DVarRef::shallow_copy(DVarRef & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 e0dc04f7..0bf7915d 100644 --- a/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp +++ b/xo-expression2/src/expression2/facet/IGCObject_DVariable.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVariable::shallow_copy(const DVariable & self, obj mm) noexcept -> Opaque + IGCObject_DVariable::shallow_copy(DVariable & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - auto IGCObject_DVariable::forward_children(DVariable & self, obj gc) noexcept -> size_type { diff --git a/xo-gc/include/xo/gc/GCObjectStore.hpp b/xo-gc/include/xo/gc/GCObjectStore.hpp index 83aec4ec..1191e17a 100644 --- a/xo-gc/include/xo/gc/GCObjectStore.hpp +++ b/xo-gc/include/xo/gc/GCObjectStore.hpp @@ -49,7 +49,7 @@ namespace xo { /** lookup interface from type sequence * (can use tseq = typeseq::id() for type T) **/ - const AGCObject * lookup_type(typeseq tseq) const noexcept; + AGCObject * lookup_type(typeseq tseq) const noexcept; /** generation to which pointer @p addr belongs, given role @p r; * sentinel if not found in this collector @@ -217,7 +217,7 @@ namespace xo { * Shallow: does not traverse children **/ void * _shallow_move(DX1Collector * gc, - const AGCObject * iface, + AGCObject * iface, void * from_src); private: diff --git a/xo-gc/src/gc/GCObjectStore.cpp b/xo-gc/src/gc/GCObjectStore.cpp index df897e37..9fb14498 100644 --- a/xo-gc/src/gc/GCObjectStore.cpp +++ b/xo-gc/src/gc/GCObjectStore.cpp @@ -110,7 +110,7 @@ namespace xo { return slot.is_occupied(); } - const AGCObject * + AGCObject * GCObjectStore::lookup_type(typeseq tseq) const noexcept { scope log(XO_DEBUG(false)); @@ -846,7 +846,7 @@ namespace xo { GCMoveCheckpoint gray_lo_v = this->snap_move_checkpoint(upto); //obj alloc(this); - const AGCObject * iface = lookup_type(tseq); + AGCObject * iface = this->lookup_type(tseq); assert(iface->_has_null_vptr() == false); @@ -861,7 +861,7 @@ namespace xo { void * GCObjectStore::_shallow_move(DX1Collector * gc, - const AGCObject * iface, + AGCObject * iface, void * from_src) { scope log(XO_DEBUG(config_.debug_flag_)); diff --git a/xo-interpreter2/CMakeLists.txt b/xo-interpreter2/CMakeLists.txt index d31bbd4c..18463e9d 100644 --- a/xo-interpreter2/CMakeLists.txt +++ b/xo-interpreter2/CMakeLists.txt @@ -172,7 +172,6 @@ xo_add_genfacetimpl( xo_add_genfacetimpl( TARGET xo-interpreter2-facetimpl-gcobject-localenv FACET_PKG xo_alloc2 -# REPR LocalEnv INPUT idl/IGCObject_DLocalEnv.json5 ) @@ -180,7 +179,6 @@ xo_add_genfacetimpl( xo_add_genfacetimpl( TARGET xo-interpreter2-facetimpl-printable-localenv FACET_PKG xo_printable2 -# REPR LocalEnv INPUT idl/IPrintable_DLocalEnv.json5 ) @@ -189,7 +187,6 @@ xo_add_genfacetimpl( xo_add_genfacetimpl( TARGET xo-interpreter2-facetimpl-runtimecontext-vsmrcx FACET_PKG xo_procedure2 -# REPR DVsmRcx INPUT idl/IRuntimeContext_DVsmRcx.json5 ) diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmDefContFrame.hpp index c0e6ed0f..249ead9c 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_copy(obj mm) const noexcept; + DVsmDefContFrame * shallow_copy(obj mm) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/DVsmIfElseContFrame.hpp index 8efd9299..af98b9a5 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_copy(obj mm) const noexcept; + DVsmIfElseContFrame * shallow_copy(obj mm) 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 6b543d8b..bb4e64fc 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_copy(obj mm) const noexcept; + DVsmSeqContFrame * shallow_copy(obj mm) noexcept; std::size_t forward_children(obj gc) noexcept; ///@} diff --git a/xo-interpreter2/include/xo/interpreter2/LocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/LocalEnv.hpp index 8955e35d..b1b302fd 100644 --- a/xo-interpreter2/include/xo/interpreter2/LocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/LocalEnv.hpp @@ -6,7 +6,7 @@ #pragma once #include "DLocalEnv.hpp" -#include "detail/IGCObject_DLocalEnv.hpp" +#include "env/IGCObject_DLocalEnv.hpp" #include "detail/IPrintable_DLocalEnv.hpp" /* end LocalEnv.hpp */ diff --git a/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp b/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp index f287f9fb..33192f6e 100644 --- a/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmDefContFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmDefContFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmDefContFrame & self, obj mm) 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 592b1640..67bb24ae 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DClosure.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DClosure & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DClosure & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DClosure & self, obj mm) 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_DLocalEnv.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DLocalEnv.hpp deleted file mode 100644 index 25db925a..00000000 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DLocalEnv.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/** @file IGCObject_DLocalEnv.hpp - * - * Generated automagically from ingredients: - * 1. code generator: - * [xo-facet/codegen/genfacet] - * arguments: - * --input [idl/IGCObject_DLocalEnv.json5] - * 2. jinja2 template for abstract facet .hpp file: - * [iface_facet_repr.hpp.j2] - * 3. idl for facet methods - * [idl/IGCObject_DLocalEnv.json5] - **/ - -#pragma once - -#include "GCObject.hpp" -#include -#include -#include "DLocalEnv.hpp" - -namespace xo { namespace scm { class IGCObject_DLocalEnv; } } - -namespace xo { - namespace facet { - template <> - struct FacetImplementation - { - using ImplType = xo::mm::IGCObject_Xfer - ; - }; - } -} - -namespace xo { - namespace scm { - /** @class IGCObject_DLocalEnv - **/ - class IGCObject_DLocalEnv { - public: - /** @defgroup scm-gcobject-dlocalenv-type-traits **/ - ///@{ - using size_type = xo::mm::AGCObject::size_type; - using AAllocator = xo::mm::AGCObject::AAllocator; - using ACollector = xo::mm::AGCObject::ACollector; - using Copaque = xo::mm::AGCObject::Copaque; - using Opaque = xo::mm::AGCObject::Opaque; - ///@} - /** @defgroup scm-gcobject-dlocalenv-methods **/ - ///@{ - // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DLocalEnv & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DLocalEnv & self, obj mm) noexcept; - - // non-const methods - /** during GC: forward immdiate children **/ - static size_type forward_children(DLocalEnv & self, obj gc) noexcept; - ///@} - }; - - } /*namespace scm*/ -} /*namespace xo*/ - -/* end */ diff --git a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp index 1d455a71..6151d76b 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmApplyClosureFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmApplyClosureFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmApplyClosureFrame & self, obj mm) 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 a2257125..384b5b32 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmApplyFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmApplyFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmApplyFrame & self, obj mm) 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 3816203c..17651a71 100644 --- a/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmEvalArgsFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmEvalArgsFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmEvalArgsFrame & self, obj mm) 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 93f1cce3..9d2cc682 100644 --- a/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp +++ b/xo-interpreter2/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DLocalEnv & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DLocalEnv & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DLocalEnv & self, obj mm) 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 d62c896b..71afdd6a 100644 --- a/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmIfElseContFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmIfElseContFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmIfElseContFrame & self, obj mm) 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 acf77945..e778456d 100644 --- a/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp +++ b/xo-interpreter2/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVsmSeqContFrame & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVsmSeqContFrame & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVsmSeqContFrame & self, obj mm) 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/IGCObject_DVirtualSchematikaMachine.hpp b/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp index a9f61740..7b391c2f 100644 --- a/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp +++ b/xo-interpreter2/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DVirtualSchematikaMachine & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DVirtualSchematikaMachine & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DVirtualSchematikaMachine & self, obj mm) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DVirtualSchematikaMachine & self, obj gc) noexcept; ///@} diff --git a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp index 2d5c9adf..6d39d1f1 100644 --- a/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmDefContFrame.cpp @@ -38,7 +38,7 @@ namespace xo { } DVsmDefContFrame * - DVsmDefContFrame::shallow_copy(obj mm) const noexcept + DVsmDefContFrame::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp index f47419e0..cc5427aa 100644 --- a/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmIfElseContFrame.cpp @@ -36,7 +36,7 @@ namespace xo { } DVsmIfElseContFrame * - DVsmIfElseContFrame::shallow_copy(obj mm) const noexcept + DVsmIfElseContFrame::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp index 80c1665f..8a4fc555 100644 --- a/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/DVsmSeqContFrame.cpp @@ -39,7 +39,7 @@ namespace xo { } DVsmSeqContFrame * - DVsmSeqContFrame::shallow_copy(obj mm) const noexcept + DVsmSeqContFrame::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp index 28dd3277..be8edfc4 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DClosure.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DClosure::shallow_copy(const DClosure & self, obj mm) noexcept -> Opaque + IGCObject_DClosure::shallow_copy(DClosure & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 7a05d47e..9bfd8cb3 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmApplyClosureFrame::shallow_copy(const DVsmApplyClosureFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmApplyClosureFrame::shallow_copy(DVsmApplyClosureFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 1e794477..0c544c22 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmApplyFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmApplyFrame::shallow_copy(const DVsmApplyFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmApplyFrame::shallow_copy(DVsmApplyFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 26a23611..c133e714 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmDefContFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmDefContFrame::shallow_copy(const DVsmDefContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmDefContFrame::shallow_copy(DVsmDefContFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 d64b47bd..13c72cfe 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmEvalArgsFrame::shallow_copy(const DVsmEvalArgsFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmEvalArgsFrame::shallow_copy(DVsmEvalArgsFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 ba66cd8d..e28d5121 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmIfElseContFrame::shallow_copy(const DVsmIfElseContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmIfElseContFrame::shallow_copy(DVsmIfElseContFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 eecdf291..8bdbd2fc 100644 --- a/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp +++ b/xo-interpreter2/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVsmSeqContFrame::shallow_copy(const DVsmSeqContFrame & self, obj mm) noexcept -> Opaque + IGCObject_DVsmSeqContFrame::shallow_copy(DVsmSeqContFrame & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 3b6cd5f7..7e36de26 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DLocalEnv.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DLocalEnv::shallow_copy(const DLocalEnv & self, obj mm) noexcept -> Opaque + IGCObject_DLocalEnv::shallow_copy(DLocalEnv & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 557990f8..acb698ac 100644 --- a/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp +++ b/xo-interpreter2/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DVirtualSchematikaMachine::shallow_copy(const DVirtualSchematikaMachine & self, obj mm) noexcept -> Opaque + IGCObject_DVirtualSchematikaMachine::shallow_copy(DVirtualSchematikaMachine & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - auto IGCObject_DVirtualSchematikaMachine::forward_children(DVirtualSchematikaMachine & self, obj gc) noexcept -> size_type { diff --git a/xo-object2/include/xo/object2/DDictionary.hpp b/xo-object2/include/xo/object2/DDictionary.hpp index 63a7eba1..1c77d2cf 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_copy(obj mm) const noexcept; + DDictionary * shallow_copy(obj mm) 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/DList.hpp b/xo-object2/include/xo/object2/DList.hpp index ddc54f3f..f6ea9d8b 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_copy(obj mm) const noexcept; + DList * shallow_copy(obj mm) noexcept; size_type 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 d2b4f340..4854eff4 100644 --- a/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp +++ b/xo-object2/include/xo/object2/array/IGCObject_DArray.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DArray & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DArray & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DArray & self, obj mm) 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 9afd9646..c437f0bc 100644 --- a/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp +++ b/xo-object2/include/xo/object2/boolean/IGCObject_DBoolean.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DBoolean & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DBoolean & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DBoolean & self, obj mm) 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 3682f095..323afd6e 100644 --- a/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp +++ b/xo-object2/include/xo/object2/dictionary/IGCObject_DDictionary.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DDictionary & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DDictionary & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DDictionary & self, obj mm) 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 3bb4d3d8..f09be05a 100644 --- a/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp +++ b/xo-object2/include/xo/object2/error/IGCObject_DRuntimeError.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DRuntimeError & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DRuntimeError & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DRuntimeError & self, obj mm) 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 7e1f1428..e601ce0b 100644 --- a/xo-object2/include/xo/object2/list/IGCObject_DList.hpp +++ b/xo-object2/include/xo/object2/list/IGCObject_DList.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DList & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DList & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DList & self, obj mm) 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 e62d14d3..f9040b1b 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DFloat.hpp @@ -51,10 +51,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DFloat & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DFloat & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DFloat & self, obj mm) 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 f2737071..b6532128 100644 --- a/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp +++ b/xo-object2/include/xo/object2/number/IGCObject_DInteger.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DInteger & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DInteger & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DInteger & self, obj mm) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DInteger & self, obj gc) noexcept; ///@} diff --git a/xo-object2/include/xo/object2/sequence/ASequence.hpp b/xo-object2/include/xo/object2/sequence/ASequence.hpp index 44f1d1cb..fcb272bc 100644 --- a/xo-object2/include/xo/object2/sequence/ASequence.hpp +++ b/xo-object2/include/xo/object2/sequence/ASequence.hpp @@ -49,6 +49,11 @@ public: /** @defgroup scm-sequence-methods **/ ///@{ // const methods + /** An uninitialized ASequence 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-object2/src/object2/DDictionary.cpp b/xo-object2/src/object2/DDictionary.cpp index d585ded4..263ea97d 100644 --- a/xo-object2/src/object2/DDictionary.cpp +++ b/xo-object2/src/object2/DDictionary.cpp @@ -274,7 +274,7 @@ namespace xo { } DDictionary * - DDictionary::shallow_copy(obj mm) const noexcept + DDictionary::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-object2/src/object2/DList.cpp b/xo-object2/src/object2/DList.cpp index b9ac0583..6f93147e 100644 --- a/xo-object2/src/object2/DList.cpp +++ b/xo-object2/src/object2/DList.cpp @@ -185,7 +185,7 @@ namespace xo { } DList * - DList::shallow_copy(obj mm) const noexcept + DList::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-object2/src/object2/IGCObject_DArray.cpp b/xo-object2/src/object2/IGCObject_DArray.cpp index 1063bd45..9b28a3de 100644 --- a/xo-object2/src/object2/IGCObject_DArray.cpp +++ b/xo-object2/src/object2/IGCObject_DArray.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DArray::shallow_copy(const DArray & self, obj mm) noexcept -> Opaque + IGCObject_DArray::shallow_copy(DArray & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 3ef60aea..e6bd6000 100644 --- a/xo-object2/src/object2/IGCObject_DBoolean.cpp +++ b/xo-object2/src/object2/IGCObject_DBoolean.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DBoolean::shallow_copy(const DBoolean & self, obj mm) noexcept -> Opaque + IGCObject_DBoolean::shallow_copy(DBoolean & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 a6705d98..0466edd5 100644 --- a/xo-object2/src/object2/IGCObject_DDictionary.cpp +++ b/xo-object2/src/object2/IGCObject_DDictionary.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DDictionary::shallow_copy(const DDictionary & self, obj mm) noexcept -> Opaque + IGCObject_DDictionary::shallow_copy(DDictionary & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 9e31cf68..4b1ab562 100644 --- a/xo-object2/src/object2/IGCObject_DFloat.cpp +++ b/xo-object2/src/object2/IGCObject_DFloat.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DFloat::shallow_copy(const DFloat & self, obj mm) noexcept -> Opaque + IGCObject_DFloat::shallow_copy(DFloat & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 55e1fae7..fbb31908 100644 --- a/xo-object2/src/object2/IGCObject_DInteger.cpp +++ b/xo-object2/src/object2/IGCObject_DInteger.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DInteger::shallow_copy(const DInteger & self, obj mm) noexcept -> Opaque + IGCObject_DInteger::shallow_copy(DInteger & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 f4e9472b..80cd7cd1 100644 --- a/xo-object2/src/object2/IGCObject_DList.cpp +++ b/xo-object2/src/object2/IGCObject_DList.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DList::shallow_copy(const DList & self, obj mm) noexcept -> Opaque + IGCObject_DList::shallow_copy(DList & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 d44c4359..6d167819 100644 --- a/xo-object2/src/object2/IGCObject_DRuntimeError.cpp +++ b/xo-object2/src/object2/IGCObject_DRuntimeError.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DRuntimeError::shallow_copy(const DRuntimeError & self, obj mm) noexcept -> Opaque + IGCObject_DRuntimeError::shallow_copy(DRuntimeError & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - auto IGCObject_DRuntimeError::forward_children(DRuntimeError & self, obj gc) noexcept -> size_type { 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 c8865270..6660dad2 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 @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DPrimitive_gco_0 & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DPrimitive_gco_0 & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DPrimitive_gco_0 & self, obj mm) 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 ac5a4439..a4aa56e2 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 @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DPrimitive_gco_1_gco & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DPrimitive_gco_1_gco & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DPrimitive_gco_1_gco & self, obj mm) 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 256ad716..a2e6e32a 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 @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DPrimitive_gco_2_dict_string & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DPrimitive_gco_2_dict_string & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DPrimitive_gco_2_dict_string & self, obj mm) 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 fee6d62b..bad1200f 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 @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DPrimitive_gco_2_gco_gco & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DPrimitive_gco_2_gco_gco & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DPrimitive_gco_2_gco_gco & self, obj mm) 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 951bda1c..6b5ddc3b 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 @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DPrimitive_gco_3_dict_string_gco & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DPrimitive_gco_3_dict_string_gco & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DPrimitive_gco_3_dict_string_gco & self, obj mm) 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 1864246d..9e078589 100644 --- a/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp +++ b/xo-procedure2/src/procedure2/facet/IGCObject_DPrimitive_gco_0.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_0::shallow_copy(const DPrimitive_gco_0 & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_0::shallow_copy(DPrimitive_gco_0 & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 6d7205d5..b9a1b354 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,11 +22,10 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_1_gco::shallow_copy(const DPrimitive_gco_1_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_1_gco::shallow_copy(DPrimitive_gco_1_gco & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 ec65d3d0..7bc9965f 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,11 +22,10 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_2_dict_string::shallow_copy(const DPrimitive_gco_2_dict_string & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_dict_string::shallow_copy(DPrimitive_gco_2_dict_string & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 b889d0d0..e770888b 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,11 +22,10 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_2_gco_gco::shallow_copy(const DPrimitive_gco_2_gco_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_2_gco_gco::shallow_copy(DPrimitive_gco_2_gco_gco & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 7b199bd6..f2dd967d 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,11 +22,10 @@ namespace xo { } auto - IGCObject_DPrimitive_gco_3_dict_string_gco::shallow_copy(const DPrimitive_gco_3_dict_string_gco & self, obj mm) noexcept -> Opaque + IGCObject_DPrimitive_gco_3_dict_string_gco::shallow_copy(DPrimitive_gco_3_dict_string_gco & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 da7f8536..fa9d52f8 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_copy(obj mm) const noexcept; + DGlobalEnv * shallow_copy(obj mm) 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 a2fcb5f6..e4ff328a 100644 --- a/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp +++ b/xo-reader2/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DGlobalEnv & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DGlobalEnv & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DGlobalEnv & self, obj mm) 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/IGCObject_DSchematikaParser.hpp b/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp index afe0d6b5..5c8e1975 100644 --- a/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp +++ b/xo-reader2/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DSchematikaParser & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DSchematikaParser & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DSchematikaParser & self, obj mm) 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 386db966..c404d21a 100644 --- a/xo-reader2/src/reader2/DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/DGlobalEnv.cpp @@ -114,7 +114,7 @@ namespace xo { } DGlobalEnv * - DGlobalEnv::shallow_copy(obj mm) const noexcept + DGlobalEnv::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp index 76606d6f..9a3e3e45 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DGlobalEnv.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DGlobalEnv::shallow_copy(const DGlobalEnv & self, obj mm) noexcept -> Opaque + IGCObject_DGlobalEnv::shallow_copy(DGlobalEnv & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 0ac80e37..582eb902 100644 --- a/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp +++ b/xo-reader2/src/reader2/facet/IGCObject_DSchematikaParser.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DSchematikaParser::shallow_copy(const DSchematikaParser & self, obj mm) noexcept -> Opaque + IGCObject_DSchematikaParser::shallow_copy(DSchematikaParser & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - auto IGCObject_DSchematikaParser::forward_children(DSchematikaParser & self, obj gc) noexcept -> size_type { diff --git a/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp b/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp index 64382151..c04d9a01 100644 --- a/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/string/IGCObject_DString.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DString & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DString & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DString & self, obj mm) 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 2150decf..4701e503 100644 --- a/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/uniquestring/IGCObject_DUniqueString.hpp @@ -52,10 +52,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DUniqueString & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DUniqueString & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DUniqueString & self, obj mm) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DUniqueString & self, obj gc) noexcept; ///@} diff --git a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp index d34f0eaf..0cc3518c 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DString.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DString::shallow_copy(const DString & self, obj mm) noexcept -> Opaque + IGCObject_DString::shallow_copy(DString & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 b51f0eb1..ba3e24e7 100644 --- a/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp +++ b/xo-stringtable2/src/stringtable2/IGCObject_DUniqueString.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DUniqueString::shallow_copy(const DUniqueString & self, obj mm) noexcept -> Opaque + IGCObject_DUniqueString::shallow_copy(DUniqueString & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 a8efe329..2d12f19b 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_copy(obj mm) const noexcept; + DArrayType * shallow_copy(obj mm) 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 6cd11ba5..406ed469 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_copy(obj mm) const noexcept; + DAtomicType * shallow_copy(obj mm) 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 51568bf5..c3d409d6 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_copy(obj mm) const noexcept; + DFunctionType * shallow_copy(obj mm) 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 e19e48b2..8b5e057a 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_copy(obj mm) const noexcept; + DListType * shallow_copy(obj mm) 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 bb71960f..a436a089 100644 --- a/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp +++ b/xo-type/include/xo/type/array/IGCObject_DArrayType.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DArrayType & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DArrayType & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DArrayType & self, obj mm) 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 c1fff453..4a5a5700 100644 --- a/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp +++ b/xo-type/include/xo/type/atomic/IGCObject_DAtomicType.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DAtomicType & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DAtomicType & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DAtomicType & self, obj mm) 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 431c19e8..bc632857 100644 --- a/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp +++ b/xo-type/include/xo/type/function/IGCObject_DFunctionType.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DFunctionType & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DFunctionType & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DFunctionType & self, obj mm) 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 6393d35b..cd017ec0 100644 --- a/xo-type/include/xo/type/list/IGCObject_DListType.hpp +++ b/xo-type/include/xo/type/list/IGCObject_DListType.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DListType & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DListType & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DListType & self, obj mm) noexcept; /** during GC: forward immdiate children **/ static size_type forward_children(DListType & self, obj gc) noexcept; ///@} diff --git a/xo-type/include/xo/type/type/AType.hpp b/xo-type/include/xo/type/type/AType.hpp index d0e8361f..018c0f54 100644 --- a/xo-type/include/xo/type/type/AType.hpp +++ b/xo-type/include/xo/type/type/AType.hpp @@ -50,6 +50,11 @@ public: /** @defgroup scm-type-methods **/ ///@{ // const methods + /** An uninitialized AType 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-type/include/xo/type/typevar/DTypeVarRef.hpp b/xo-type/include/xo/type/typevar/DTypeVarRef.hpp index 0f67ee1b..d53caa0c 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_copy(obj mm) const noexcept; + DTypeVarRef * shallow_copy(obj mm) 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 876caaaa..56780e3e 100644 --- a/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp +++ b/xo-type/include/xo/type/typevar/IGCObject_DTypeVarRef.hpp @@ -50,10 +50,10 @@ namespace xo { // const methods /** memory consumption for this instance **/ static size_type shallow_size(const DTypeVarRef & self) noexcept; - /** copy instance using allocator **/ - static Opaque shallow_copy(const DTypeVarRef & self, obj mm) noexcept; // non-const methods + /** copy instance using allocator **/ + static Opaque shallow_copy(DTypeVarRef & self, obj mm) 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 652186ab..f13f234a 100644 --- a/xo-type/src/type/DArrayType.cpp +++ b/xo-type/src/type/DArrayType.cpp @@ -83,7 +83,7 @@ namespace xo { } DArrayType * - DArrayType::shallow_copy(obj mm) const noexcept + DArrayType::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-type/src/type/DAtomicType.cpp b/xo-type/src/type/DAtomicType.cpp index bc2fe558..347e7f5f 100644 --- a/xo-type/src/type/DAtomicType.cpp +++ b/xo-type/src/type/DAtomicType.cpp @@ -61,7 +61,7 @@ namespace xo { } DAtomicType * - DAtomicType::shallow_copy(obj mm) const noexcept + DAtomicType::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-type/src/type/DFunctionType.cpp b/xo-type/src/type/DFunctionType.cpp index 88de628b..4cc83dba 100644 --- a/xo-type/src/type/DFunctionType.cpp +++ b/xo-type/src/type/DFunctionType.cpp @@ -94,7 +94,7 @@ namespace xo { } DFunctionType * - DFunctionType::shallow_copy(obj mm) const noexcept + DFunctionType::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-type/src/type/DListType.cpp b/xo-type/src/type/DListType.cpp index 47c8ea1f..b4e2cd4e 100644 --- a/xo-type/src/type/DListType.cpp +++ b/xo-type/src/type/DListType.cpp @@ -88,7 +88,7 @@ namespace xo { } DListType * - DListType::shallow_copy(obj mm) const noexcept + DListType::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-type/src/type/DTypeVarRef.cpp b/xo-type/src/type/DTypeVarRef.cpp index 8da0ec0a..ec021ab6 100644 --- a/xo-type/src/type/DTypeVarRef.cpp +++ b/xo-type/src/type/DTypeVarRef.cpp @@ -82,7 +82,7 @@ namespace xo { } DTypeVarRef * - DTypeVarRef::shallow_copy(obj mm) const noexcept + DTypeVarRef::shallow_copy(obj mm) noexcept { return mm.std_copy_for(this); } diff --git a/xo-type/src/type/IGCObject_DArrayType.cpp b/xo-type/src/type/IGCObject_DArrayType.cpp index 936f8eec..43287c83 100644 --- a/xo-type/src/type/IGCObject_DArrayType.cpp +++ b/xo-type/src/type/IGCObject_DArrayType.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DArrayType::shallow_copy(const DArrayType & self, obj mm) noexcept -> Opaque + IGCObject_DArrayType::shallow_copy(DArrayType & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 17f3a56a..a5691676 100644 --- a/xo-type/src/type/IGCObject_DAtomicType.cpp +++ b/xo-type/src/type/IGCObject_DAtomicType.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DAtomicType::shallow_copy(const DAtomicType & self, obj mm) noexcept -> Opaque + IGCObject_DAtomicType::shallow_copy(DAtomicType & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 45141b3a..9ba3ff39 100644 --- a/xo-type/src/type/IGCObject_DFunctionType.cpp +++ b/xo-type/src/type/IGCObject_DFunctionType.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DFunctionType::shallow_copy(const DFunctionType & self, obj mm) noexcept -> Opaque + IGCObject_DFunctionType::shallow_copy(DFunctionType & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 761ae617..da899cd9 100644 --- a/xo-type/src/type/IGCObject_DListType.cpp +++ b/xo-type/src/type/IGCObject_DListType.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DListType::shallow_copy(const DListType & self, obj mm) noexcept -> Opaque + IGCObject_DListType::shallow_copy(DListType & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - 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 c0aeb3bc..ade79944 100644 --- a/xo-type/src/type/IGCObject_DTypeVarRef.cpp +++ b/xo-type/src/type/IGCObject_DTypeVarRef.cpp @@ -22,11 +22,10 @@ namespace xo { } auto - IGCObject_DTypeVarRef::shallow_copy(const DTypeVarRef & self, obj mm) noexcept -> Opaque + IGCObject_DTypeVarRef::shallow_copy(DTypeVarRef & self, obj mm) noexcept -> Opaque { return self.shallow_copy(mm); } - auto IGCObject_DTypeVarRef::forward_children(DTypeVarRef & self, obj gc) noexcept -> size_type {