refactor: rename shallow_copy -> shallow_move + streamline
Use RCollector.std_copy_for where appropriate
This commit is contained in:
parent
2003c3c6f9
commit
d16f2a0484
44 changed files with 72 additions and 114 deletions
|
|
@ -83,7 +83,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DApplyExpr * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DApplyExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DConstant * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DConstant * shallow_move(obj<ACollector> gc) noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DDefineExpr * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
DDefineExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ namespace xo {
|
|||
DGlobalSymtab(dp<repr_type> var_map, DArray * vars,
|
||||
dp<repr_type> type_map, DArray * types);
|
||||
|
||||
/** move constructor (needed because dp<> deletes copy ctor) **/
|
||||
DGlobalSymtab(DGlobalSymtab && other) = default;
|
||||
|
||||
/** create instance.
|
||||
* Use memory from @p fixed_mm for @ref map_.
|
||||
* Use memory from @p mm for DGlobalSymtab instance.
|
||||
|
|
@ -111,7 +114,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DGlobalSymtab * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DGlobalSymtab * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DIfElseExpr * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DIfElseExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DLambdaExpr * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DLambdaExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DLocalSymtab * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
DLocalSymtab * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DSequenceExpr * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DSequenceExpr * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DTypename * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
DTypename * shallow_move(obj<ACollector> gc) noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DVarRef * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DVarRef * shallow_move(obj<ACollector> gc) noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DVariable * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
DVariable * shallow_move(obj<ACollector> gc) noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DDefineExpr & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DApplyExpr & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DConstant & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DConstant & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DConstant & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DIfElseExpr & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DLambdaExpr & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DSequenceExpr & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVarRef & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DVarRef & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVarRef & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DGlobalSymtab & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DLocalSymtab & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DTypename & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DTypename & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DTypename & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
|
||||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVariable & self, obj<AAllocator> mm) noexcept;
|
||||
static Opaque shallow_move(DVariable & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVariable & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue