From c3af7633832bc5413240c3c3bc8c444f0eb443c1 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 4 Apr 2026 17:30:03 -0400 Subject: [PATCH] refactor: retire GCObject.shallow_size() Not needed. Rely on size stored in gc-owned object header --- include/xo/expression2/define/IGCObject_DDefineExpr.hpp | 2 -- include/xo/expression2/detail/IGCObject_DApplyExpr.hpp | 2 -- include/xo/expression2/detail/IGCObject_DConstant.hpp | 2 -- include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp | 2 -- include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp | 2 -- include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp | 2 -- include/xo/expression2/detail/IGCObject_DVarRef.hpp | 2 -- include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp | 2 -- include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp | 2 -- include/xo/expression2/typename/IGCObject_DTypename.hpp | 2 -- include/xo/expression2/variable/IGCObject_DVariable.hpp | 2 -- src/expression2/IGCObject_DApplyExpr.cpp | 6 ------ src/expression2/IGCObject_DConstant.cpp | 6 ------ src/expression2/IGCObject_DDefineExpr.cpp | 6 ------ src/expression2/IGCObject_DGlobalSymtab.cpp | 6 ------ src/expression2/IGCObject_DIfElseExpr.cpp | 6 ------ src/expression2/IGCObject_DLambdaExpr.cpp | 6 ------ src/expression2/IGCObject_DLocalSymtab.cpp | 6 ------ src/expression2/IGCObject_DSequenceExpr.cpp | 6 ------ src/expression2/IGCObject_DTypename.cpp | 6 ------ src/expression2/IGCObject_DVarRef.cpp | 6 ------ src/expression2/facet/IGCObject_DVariable.cpp | 6 ------ 22 files changed, 88 deletions(-) diff --git a/include/xo/expression2/define/IGCObject_DDefineExpr.hpp b/include/xo/expression2/define/IGCObject_DDefineExpr.hpp index e01e7be7..c0e774c8 100644 --- a/include/xo/expression2/define/IGCObject_DDefineExpr.hpp +++ b/include/xo/expression2/define/IGCObject_DDefineExpr.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-ddefineexpr-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DDefineExpr & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp b/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp index b85665c8..477a9b77 100644 --- a/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp +++ b/include/xo/expression2/detail/IGCObject_DApplyExpr.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dapplyexpr-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DApplyExpr & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DConstant.hpp b/include/xo/expression2/detail/IGCObject_DConstant.hpp index 91bf9638..6d631c74 100644 --- a/include/xo/expression2/detail/IGCObject_DConstant.hpp +++ b/include/xo/expression2/detail/IGCObject_DConstant.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dconstant-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DConstant & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp b/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp index 59aae40f..c4917774 100644 --- a/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp +++ b/include/xo/expression2/detail/IGCObject_DIfElseExpr.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-difelseexpr-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DIfElseExpr & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp b/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp index 2351256d..6a484b28 100644 --- a/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp +++ b/include/xo/expression2/detail/IGCObject_DLambdaExpr.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dlambdaexpr-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DLambdaExpr & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp b/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp index c3fba848..0bcf1f90 100644 --- a/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp +++ b/include/xo/expression2/detail/IGCObject_DSequenceExpr.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dsequenceexpr-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DSequenceExpr & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/detail/IGCObject_DVarRef.hpp b/include/xo/expression2/detail/IGCObject_DVarRef.hpp index 97b0f3d6..91c1888c 100644 --- a/include/xo/expression2/detail/IGCObject_DVarRef.hpp +++ b/include/xo/expression2/detail/IGCObject_DVarRef.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dvarref-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DVarRef & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp b/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp index 5de0f0da..692be2fc 100644 --- a/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp +++ b/include/xo/expression2/symtab/IGCObject_DGlobalSymtab.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dglobalsymtab-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DGlobalSymtab & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp b/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp index 6b9d81a1..42de5a79 100644 --- a/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp +++ b/include/xo/expression2/symtab/IGCObject_DLocalSymtab.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dlocalsymtab-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DLocalSymtab & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/typename/IGCObject_DTypename.hpp b/include/xo/expression2/typename/IGCObject_DTypename.hpp index 5e94f460..3ed445aa 100644 --- a/include/xo/expression2/typename/IGCObject_DTypename.hpp +++ b/include/xo/expression2/typename/IGCObject_DTypename.hpp @@ -48,8 +48,6 @@ namespace xo { /** @defgroup scm-gcobject-dtypename-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DTypename & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/include/xo/expression2/variable/IGCObject_DVariable.hpp b/include/xo/expression2/variable/IGCObject_DVariable.hpp index f7745ca9..84c224cd 100644 --- a/include/xo/expression2/variable/IGCObject_DVariable.hpp +++ b/include/xo/expression2/variable/IGCObject_DVariable.hpp @@ -50,8 +50,6 @@ namespace xo { /** @defgroup scm-gcobject-dvariable-methods **/ ///@{ // const methods - /** memory consumption for this instance **/ - static size_type shallow_size(const DVariable & self) noexcept; // non-const methods /** move instance using allocator **/ diff --git a/src/expression2/IGCObject_DApplyExpr.cpp b/src/expression2/IGCObject_DApplyExpr.cpp index d891b9de..56fdda92 100644 --- a/src/expression2/IGCObject_DApplyExpr.cpp +++ b/src/expression2/IGCObject_DApplyExpr.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DApplyExpr::shallow_size(const DApplyExpr & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DApplyExpr::shallow_move(DApplyExpr & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DConstant.cpp b/src/expression2/IGCObject_DConstant.cpp index 256ba991..62bf0fd7 100644 --- a/src/expression2/IGCObject_DConstant.cpp +++ b/src/expression2/IGCObject_DConstant.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DConstant::shallow_size(const DConstant & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DConstant::shallow_move(DConstant & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DDefineExpr.cpp b/src/expression2/IGCObject_DDefineExpr.cpp index b10d3ecd..91c83d67 100644 --- a/src/expression2/IGCObject_DDefineExpr.cpp +++ b/src/expression2/IGCObject_DDefineExpr.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DDefineExpr::shallow_size(const DDefineExpr & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DDefineExpr::shallow_move(DDefineExpr & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DGlobalSymtab.cpp b/src/expression2/IGCObject_DGlobalSymtab.cpp index 70f541d3..9f9549ae 100644 --- a/src/expression2/IGCObject_DGlobalSymtab.cpp +++ b/src/expression2/IGCObject_DGlobalSymtab.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DGlobalSymtab::shallow_size(const DGlobalSymtab & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DGlobalSymtab::shallow_move(DGlobalSymtab & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DIfElseExpr.cpp b/src/expression2/IGCObject_DIfElseExpr.cpp index 05e997cf..532cad21 100644 --- a/src/expression2/IGCObject_DIfElseExpr.cpp +++ b/src/expression2/IGCObject_DIfElseExpr.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DIfElseExpr::shallow_size(const DIfElseExpr & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DIfElseExpr::shallow_move(DIfElseExpr & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DLambdaExpr.cpp b/src/expression2/IGCObject_DLambdaExpr.cpp index 0999c696..b6045e90 100644 --- a/src/expression2/IGCObject_DLambdaExpr.cpp +++ b/src/expression2/IGCObject_DLambdaExpr.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DLambdaExpr::shallow_size(const DLambdaExpr & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DLambdaExpr::shallow_move(DLambdaExpr & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DLocalSymtab.cpp b/src/expression2/IGCObject_DLocalSymtab.cpp index bf6d3b51..df9bc0b7 100644 --- a/src/expression2/IGCObject_DLocalSymtab.cpp +++ b/src/expression2/IGCObject_DLocalSymtab.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DLocalSymtab::shallow_size(const DLocalSymtab & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DLocalSymtab::shallow_move(DLocalSymtab & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DSequenceExpr.cpp b/src/expression2/IGCObject_DSequenceExpr.cpp index 9ba1cab8..36efcbfe 100644 --- a/src/expression2/IGCObject_DSequenceExpr.cpp +++ b/src/expression2/IGCObject_DSequenceExpr.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DSequenceExpr::shallow_size(const DSequenceExpr & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DSequenceExpr::shallow_move(DSequenceExpr & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DTypename.cpp b/src/expression2/IGCObject_DTypename.cpp index 76bf837f..246b7bd5 100644 --- a/src/expression2/IGCObject_DTypename.cpp +++ b/src/expression2/IGCObject_DTypename.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DTypename::shallow_size(const DTypename & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DTypename::shallow_move(DTypename & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/IGCObject_DVarRef.cpp b/src/expression2/IGCObject_DVarRef.cpp index e9869fdf..fc0934fd 100644 --- a/src/expression2/IGCObject_DVarRef.cpp +++ b/src/expression2/IGCObject_DVarRef.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DVarRef::shallow_size(const DVarRef & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DVarRef::shallow_move(DVarRef & self, obj gc) noexcept -> Opaque { diff --git a/src/expression2/facet/IGCObject_DVariable.cpp b/src/expression2/facet/IGCObject_DVariable.cpp index 657ce453..7b2103d6 100644 --- a/src/expression2/facet/IGCObject_DVariable.cpp +++ b/src/expression2/facet/IGCObject_DVariable.cpp @@ -15,12 +15,6 @@ namespace xo { namespace scm { - auto - IGCObject_DVariable::shallow_size(const DVariable & self) noexcept -> size_type - { - return self.shallow_size(); - } - auto IGCObject_DVariable::shallow_move(DVariable & self, obj gc) noexcept -> Opaque {