refactor: make AGCObject.shallow_copy() non-const
prep for moving to ACollector interface
This commit is contained in:
parent
b7cb810913
commit
761bff734e
27 changed files with 34 additions and 113 deletions
|
|
@ -51,7 +51,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmDefContFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmDefContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmIfElseContFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmIfElseContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmSeqContFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmSeqContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmDefContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmDefContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DClosure & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DClosure & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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 <xo/alloc2/GCObject.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include "DLocalEnv.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IGCObject_DLocalEnv; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject,
|
||||
xo::scm::DLocalEnv>
|
||||
{
|
||||
using ImplType = xo::mm::IGCObject_Xfer
|
||||
<xo::scm::DLocalEnv,
|
||||
xo::scm::IGCObject_DLocalEnv>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmApplyClosureFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmApplyFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmApplyFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmEvalArgsFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DLocalEnv & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmIfElseContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmSeqContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -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<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVirtualSchematikaMachine & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue