refactor: use GCObjectVisitor api w/ gco_shallow_move
This commit is contained in:
parent
f9f2822099
commit
997d3d8264
44 changed files with 89 additions and 133 deletions
|
|
@ -21,7 +21,7 @@ namespace xo {
|
|||
**/
|
||||
class DApplyExpr {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -84,8 +84,7 @@ namespace xo {
|
|||
/** @defgroup scm-applyexpr-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DApplyExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DApplyExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "Expression.hpp"
|
||||
#include "TypeRef.hpp"
|
||||
#include "exprtype.hpp"
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
//#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/alloc2/GCObject.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/reflect/TaggedPtr.hpp>
|
||||
|
|
@ -22,7 +22,7 @@ namespace xo {
|
|||
public:
|
||||
using TaggedPtr = xo::reflect::TaggedPtr;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
|
|
@ -64,8 +64,7 @@ namespace xo {
|
|||
/** @defgroup scm-constant-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DConstant * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DConstant * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ namespace xo {
|
|||
/** @defgroup scm-defineexpr-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DDefineExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DDefineExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace xo {
|
|||
using value_type = Binding;
|
||||
using ArenaHashMapConfig = xo::map::ArenaHashMapConfig;
|
||||
using repr_type = xo::map::DArenaHashMap<key_type, Binding::slot_type>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
|
|
@ -115,7 +115,7 @@ namespace xo {
|
|||
/** @defgroup scm-globalsymtab-gcobject-facet gcobject facet **/
|
||||
///@{
|
||||
|
||||
DGlobalSymtab * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DGlobalSymtab * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "Expression.hpp"
|
||||
#include "TypeRef.hpp"
|
||||
#include "exprtype.hpp"
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
//#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <string>
|
||||
|
|
@ -21,7 +21,7 @@ namespace xo {
|
|||
**/
|
||||
class DIfElseExpr {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -98,8 +98,7 @@ namespace xo {
|
|||
/** @defgroup scm-ifelseexpr-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DIfElseExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DIfElseExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace xo {
|
|||
**/
|
||||
class DLambdaExpr {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -87,7 +87,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DLambdaExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DLambdaExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace xo {
|
|||
public:
|
||||
using DArray = xo::scm::DArray;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
|
|
@ -99,7 +99,7 @@ namespace xo {
|
|||
/** @defgroup xo-localsymtab-gcobject-facet gcobject facet **/
|
||||
///@{
|
||||
|
||||
DLocalSymtab * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DLocalSymtab * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace xo {
|
|||
**/
|
||||
class DSequenceExpr {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -74,8 +74,7 @@ namespace xo {
|
|||
/** @defgroup scm-sequenceexpr-gcobject-facet gcobject facet methods **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DSequenceExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DSequenceExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace xo {
|
|||
class DTypename {
|
||||
public:
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
|
|
@ -55,8 +55,7 @@ namespace xo {
|
|||
/** @defgroup scm-typename-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DTypename * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DTypename * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace xo {
|
|||
class DVarRef {
|
||||
public:
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -56,8 +56,7 @@ namespace xo {
|
|||
/** @defgroup scm-variable-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DVarRef * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DVarRef * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace xo {
|
|||
class DVariable {
|
||||
public:
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -64,8 +64,7 @@ namespace xo {
|
|||
/** @defgroup scm-variable-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DVariable * shallow_move(obj<ACollector> gc) noexcept;
|
||||
DVariable * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DDefineExpr & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DApplyExpr & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DConstant & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DConstant & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DIfElseExpr & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DLambdaExpr & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DSequenceExpr & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DVarRef & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DVarRef & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DGlobalSymtab & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DLocalSymtab & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -51,8 +51,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DTypename & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DTypename & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ namespace xo {
|
|||
// const methods
|
||||
|
||||
// non-const methods
|
||||
/** move instance using collector **/
|
||||
static Opaque shallow_move(DVariable & self, obj<ACollector> gc) noexcept;
|
||||
/** move instance using object visitor.
|
||||
Arguably abusing the word 'visitor' here **/
|
||||
static Opaque gco_shallow_move(DVariable & self, obj<AGCObjectVisitor> 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 **/
|
||||
|
|
|
|||
|
|
@ -104,13 +104,8 @@ namespace xo {
|
|||
|
||||
// ----- gcobject facet -----
|
||||
|
||||
std::size_t
|
||||
DApplyExpr::shallow_size() const noexcept {
|
||||
return sizeof(DApplyExpr) + (n_args_ * sizeof(obj<AExpression>));
|
||||
}
|
||||
|
||||
DApplyExpr *
|
||||
DApplyExpr::shallow_move(obj<ACollector> gc) noexcept {
|
||||
DApplyExpr::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept {
|
||||
// note: not using ACollector.std_copy_for() here,
|
||||
// flexible array -> not move-constructible
|
||||
|
||||
|
|
|
|||
|
|
@ -71,14 +71,8 @@ namespace xo {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DConstant::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DConstant);
|
||||
}
|
||||
|
||||
DConstant *
|
||||
DConstant::shallow_move(obj<ACollector> gc) noexcept
|
||||
DConstant::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,14 +78,8 @@ namespace xo {
|
|||
|
||||
// ----- GCObject facet -----
|
||||
|
||||
std::size_t
|
||||
DDefineExpr::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
DDefineExpr *
|
||||
DDefineExpr::shallow_move(obj<ACollector> gc) noexcept
|
||||
DDefineExpr::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ namespace xo {
|
|||
// ----- gcobject facet -----
|
||||
|
||||
DGlobalSymtab *
|
||||
DGlobalSymtab::shallow_move(obj<ACollector> gc) noexcept
|
||||
DGlobalSymtab::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,14 +82,8 @@ namespace xo {
|
|||
|
||||
// GCObject facet
|
||||
|
||||
std::size_t
|
||||
DIfElseExpr::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DIfElseExpr);
|
||||
}
|
||||
|
||||
DIfElseExpr *
|
||||
DIfElseExpr::shallow_move(obj<ACollector> gc) noexcept
|
||||
DIfElseExpr::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DLambdaExpr *
|
||||
DLambdaExpr::shallow_move(obj<ACollector> gc) noexcept {
|
||||
DLambdaExpr::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept {
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ namespace xo {
|
|||
// ----- gcobject facet -----
|
||||
|
||||
DLocalSymtab *
|
||||
DLocalSymtab::shallow_move(obj<ACollector> gc) noexcept
|
||||
DLocalSymtab::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,14 +113,8 @@ namespace xo {
|
|||
|
||||
// gc hooks for IGCObject_DSequenceExpr
|
||||
|
||||
std::size_t
|
||||
DSequenceExpr::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DSequenceExpr);
|
||||
}
|
||||
|
||||
DSequenceExpr *
|
||||
DSequenceExpr::shallow_move(obj<ACollector> gc) noexcept
|
||||
DSequenceExpr::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,14 +40,8 @@ namespace xo {
|
|||
: name_{name}, type_{type}
|
||||
{}
|
||||
|
||||
size_t
|
||||
DTypename::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DTypename);
|
||||
}
|
||||
|
||||
DTypename *
|
||||
DTypename::shallow_move(obj<ACollector> gc) noexcept
|
||||
DTypename::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,14 +58,8 @@ namespace xo {
|
|||
|
||||
// gcobject facet
|
||||
|
||||
std::size_t
|
||||
DVarRef::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVarRef);
|
||||
}
|
||||
|
||||
DVarRef *
|
||||
DVarRef::shallow_move(obj<ACollector> gc) noexcept
|
||||
DVarRef::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,14 +38,8 @@ namespace xo {
|
|||
typeref_.resolve(td);
|
||||
}
|
||||
|
||||
size_t
|
||||
DVariable::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVariable);
|
||||
}
|
||||
|
||||
DVariable *
|
||||
DVariable::shallow_move(obj<ACollector> gc) noexcept
|
||||
DVariable::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DApplyExpr::shallow_move(DApplyExpr & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DApplyExpr::gco_shallow_move(DApplyExpr & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DApplyExpr::visit_gco_children(DApplyExpr & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DConstant::shallow_move(DConstant & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DConstant::gco_shallow_move(DConstant & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DConstant::visit_gco_children(DConstant & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DDefineExpr::shallow_move(DDefineExpr & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DDefineExpr::gco_shallow_move(DDefineExpr & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DDefineExpr::visit_gco_children(DDefineExpr & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DGlobalSymtab::shallow_move(DGlobalSymtab & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DGlobalSymtab::gco_shallow_move(DGlobalSymtab & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DGlobalSymtab::visit_gco_children(DGlobalSymtab & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DIfElseExpr::shallow_move(DIfElseExpr & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DIfElseExpr::gco_shallow_move(DIfElseExpr & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DIfElseExpr::visit_gco_children(DIfElseExpr & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DLambdaExpr::shallow_move(DLambdaExpr & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DLambdaExpr::gco_shallow_move(DLambdaExpr & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DLambdaExpr::visit_gco_children(DLambdaExpr & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DLocalSymtab::shallow_move(DLocalSymtab & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DLocalSymtab::gco_shallow_move(DLocalSymtab & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DLocalSymtab::visit_gco_children(DLocalSymtab & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DSequenceExpr::shallow_move(DSequenceExpr & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DSequenceExpr::gco_shallow_move(DSequenceExpr & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DSequenceExpr::visit_gco_children(DSequenceExpr & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DTypename::shallow_move(DTypename & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DTypename::gco_shallow_move(DTypename & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DTypename::visit_gco_children(DTypename & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DVarRef::shallow_move(DVarRef & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DVarRef::gco_shallow_move(DVarRef & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVarRef::visit_gco_children(DVarRef & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DVariable::shallow_move(DVariable & self, obj<ACollector> gc) noexcept -> Opaque
|
||||
IGCObject_DVariable::gco_shallow_move(DVariable & self, obj<AGCObjectVisitor> gc) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_move(gc);
|
||||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVariable::visit_gco_children(DVariable & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue