refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
parent
bc83df3f08
commit
7e583b1337
36 changed files with 138 additions and 179 deletions
|
|
@ -20,8 +20,9 @@ namespace xo {
|
|||
public:
|
||||
using ARuntimeContext = xo::scm::ARuntimeContext;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using size_type = std::int32_t;
|
||||
|
||||
|
|
@ -57,9 +58,8 @@ namespace xo {
|
|||
/** @defgroup scm-closure-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DClosure * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-closure-printable-facet **/
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ namespace xo {
|
|||
public:
|
||||
using DArray = xo::scm::DArray;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using size_type = std::uint32_t;
|
||||
|
||||
|
|
@ -54,9 +55,8 @@ namespace xo {
|
|||
/** @defgroup scm-localenv-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DLocalEnv * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-localenv-printable-facet **/
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ namespace xo {
|
|||
class DVsmApplyClosureFrame {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -41,7 +42,7 @@ namespace xo {
|
|||
/** gcobject facet **/
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmApplyClosureFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
/** pretty-printing support **/
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@ namespace xo {
|
|||
public:
|
||||
using AProcedure = xo::scm::AProcedure;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -37,9 +38,8 @@ namespace xo {
|
|||
|
||||
void assign_fn(obj<AGCObject> x) { this->fn_ = x; }
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmApplyFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
/** pretty-printing support **/
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace xo {
|
|||
class DVsmDefContFrame {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -50,9 +51,8 @@ namespace xo {
|
|||
/** @defgroup scm-vsmdefcontframe-gcobject-facet gcobject facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmDefContFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@ namespace xo {
|
|||
class DVsmEvalArgsFrame {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -42,9 +43,8 @@ namespace xo {
|
|||
|
||||
int32_t increment_arg() { return ++i_arg_; }
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmEvalArgsFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ namespace xo {
|
|||
class DVsmIfElseContFrame {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -50,9 +51,8 @@ namespace xo {
|
|||
/** @defgroup scm-vsmevalsequenceframe-gcobject-facet gcobject facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmIfElseContFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ namespace xo {
|
|||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -55,9 +56,8 @@ namespace xo {
|
|||
/** @defgroup scm-vsmevalsequenceframe-gcobject-facet gcobject facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmSeqContFrame * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmDefContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmDefContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmDefContFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DClosure & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DClosure & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DClosure & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmApplyClosureFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmApplyFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmApplyFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmApplyFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmEvalArgsFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DLocalEnv & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DLocalEnv & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmIfElseContFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVsmSeqContFrame & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,9 @@ namespace xo {
|
|||
// will be DArenaVector<obj<StackFrame>> probably
|
||||
using Stack = void *;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using span_type = xo::mm::span<const char>;
|
||||
|
||||
|
|
@ -157,7 +158,7 @@ namespace xo {
|
|||
|
||||
/** forward gc-aware child pointers
|
||||
**/
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DVirtualSchematikaMachine & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,32 +64,16 @@ namespace xo {
|
|||
return err;
|
||||
}
|
||||
|
||||
size_t
|
||||
DClosure::shallow_size() const noexcept {
|
||||
return sizeof(DClosure);
|
||||
}
|
||||
|
||||
DClosure *
|
||||
DClosure::shallow_move(obj<ACollector> gc) noexcept {
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DClosure::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DClosure::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
{
|
||||
gc.forward_inplace(&lambda_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLambdaExpr>();
|
||||
//gc.forward_inplace(&iface, (void **)(&lambda_));
|
||||
|
||||
}
|
||||
{
|
||||
gc.forward_inplace(&env_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLocalEnv>();
|
||||
//gc.forward_inplace(&iface, (void **)(&env_));
|
||||
}
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&lambda_);
|
||||
gc.visit_child(&env_);
|
||||
}
|
||||
|
||||
// ----- printable facet -----
|
||||
|
|
|
|||
|
|
@ -91,33 +91,29 @@ namespace xo {
|
|||
/* something terribly wrong if control here */
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DLocalEnv::shallow_size() const noexcept {
|
||||
return sizeof(DLocalEnv);
|
||||
}
|
||||
|
||||
DLocalEnv *
|
||||
DLocalEnv::shallow_move(obj<ACollector> gc) noexcept {
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DLocalEnv::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DLocalEnv::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
{
|
||||
auto iface = xo::facet::impl_for<AGCObject,DLocalEnv>();
|
||||
gc.forward_inplace(&iface, (void **)(&parent_));
|
||||
gc.visit_child(&parent_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLocalEnv>();
|
||||
//gc.forward_inplace(&iface, (void **)(&parent_));
|
||||
}
|
||||
{
|
||||
auto iface = xo::facet::impl_for<AGCObject,DLocalSymtab>();
|
||||
gc.forward_inplace(&iface, (void **)(&symtab_));
|
||||
gc.visit_child(&symtab_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLocalSymtab>();
|
||||
//gc.forward_inplace(&iface, (void **)(&symtab_));
|
||||
}
|
||||
{
|
||||
auto iface = xo::facet::impl_for<AGCObject,DArray>();
|
||||
gc.forward_inplace(&iface, (void **)(&args_));
|
||||
gc.visit_child(&args_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DArray>();
|
||||
//gc.forward_inplace(&iface, (void **)(&args_));
|
||||
}
|
||||
|
||||
return shallow_size();
|
||||
}
|
||||
|
||||
// ----- printable facet -----
|
||||
|
|
|
|||
|
|
@ -968,22 +968,20 @@ namespace xo {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVirtualSchematikaMachine::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVirtualSchematikaMachine::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
reader_.forward_children(gc);
|
||||
reader_.visit_gco_children(gc);
|
||||
|
||||
gc.forward_inplace(&stack_);
|
||||
gc.forward_pivot_inplace(&expr_);
|
||||
gc.forward_inplace(&global_env_);
|
||||
gc.forward_inplace(&local_env_);
|
||||
gc.forward_inplace(&fn_);
|
||||
gc.forward_inplace(&args_);
|
||||
gc.visit_child(&stack_);
|
||||
gc.visit_poly_child(&expr_);
|
||||
gc.visit_child(&global_env_);
|
||||
gc.visit_child(&local_env_);
|
||||
gc.visit_child(&fn_);
|
||||
gc.visit_child(&args_);
|
||||
if (value_.is_value()) {
|
||||
gc.forward_inplace(const_cast<obj<AGCObject> *>(&value_.value_ref()));
|
||||
gc.visit_child(const_cast<obj<AGCObject> *>(&value_.value_ref()));
|
||||
}
|
||||
|
||||
return this->shallow_size();
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -32,25 +32,17 @@ namespace xo {
|
|||
return new (mem) DVsmApplyClosureFrame(stack, cont, local_env);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyClosureFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVsmApplyClosureFrame);
|
||||
}
|
||||
|
||||
DVsmApplyClosureFrame *
|
||||
DVsmApplyClosureFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyClosureFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmApplyClosureFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&stack_);
|
||||
gc.forward_inplace(&local_env_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&stack_);
|
||||
gc.visit_child(&local_env_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -40,26 +40,18 @@ namespace xo {
|
|||
return result;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVsmApplyFrame);
|
||||
}
|
||||
|
||||
DVsmApplyFrame *
|
||||
DVsmApplyFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmApplyFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&parent_);
|
||||
gc.forward_inplace(&fn_);
|
||||
gc.forward_inplace(&args_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&fn_);
|
||||
gc.visit_child(&args_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -31,25 +31,17 @@ namespace xo {
|
|||
|
||||
// gcobject facet
|
||||
|
||||
std::size_t
|
||||
DVsmDefContFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
DVsmDefContFrame *
|
||||
DVsmDefContFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for<DVsmDefContFrame>(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmDefContFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmDefContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&parent_);
|
||||
gc.forward_inplace(&def_expr_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&def_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -41,25 +41,17 @@ namespace xo {
|
|||
return result;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmEvalArgsFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVsmEvalArgsFrame);
|
||||
}
|
||||
|
||||
DVsmEvalArgsFrame *
|
||||
DVsmEvalArgsFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmEvalArgsFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmEvalArgsFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&parent_);
|
||||
gc.forward_inplace(&apply_expr_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&apply_expr_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -29,25 +29,17 @@ namespace xo {
|
|||
|
||||
// gcobject facet
|
||||
|
||||
std::size_t
|
||||
DVsmIfElseContFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
DVsmIfElseContFrame *
|
||||
DVsmIfElseContFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for<DVsmIfElseContFrame>(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmIfElseContFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmIfElseContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&parent_);
|
||||
gc.forward_inplace(&ifelse_expr_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&ifelse_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -32,25 +32,17 @@ namespace xo {
|
|||
|
||||
// gcobject facet
|
||||
|
||||
std::size_t
|
||||
DVsmSeqContFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
DVsmSeqContFrame *
|
||||
DVsmSeqContFrame::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for<DVsmSeqContFrame>(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmSeqContFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DVsmSeqContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&parent_);
|
||||
gc.forward_inplace(&seq_expr_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&seq_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DClosure::forward_children(DClosure & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DClosure::visit_gco_children(DClosure & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyClosureFrame::forward_children(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyFrame::forward_children(DVsmApplyFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmDefContFrame::forward_children(DVsmDefContFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmEvalArgsFrame::forward_children(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmIfElseContFrame::forward_children(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmSeqContFrame::forward_children(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DLocalEnv::forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVirtualSchematikaMachine::forward_children(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue