refactor: void return type for Collector.forward_children()
This commit is contained in:
parent
489222311f
commit
6b8ac3dcd2
24 changed files with 42 additions and 34 deletions
|
|
@ -44,7 +44,7 @@ namespace xo {
|
||||||
dp<repr_type> type_map, DArray * types);
|
dp<repr_type> type_map, DArray * types);
|
||||||
|
|
||||||
/** move constructor (needed because dp<> deletes copy ctor) **/
|
/** move constructor (needed because dp<> deletes copy ctor) **/
|
||||||
DGlobalSymtab(DGlobalSymtab && other) = default;
|
DGlobalSymtab(DGlobalSymtab && other);
|
||||||
|
|
||||||
/** create instance.
|
/** create instance.
|
||||||
* Use memory from @p fixed_mm for @ref map_.
|
* Use memory from @p fixed_mm for @ref map_.
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DDefineExpr & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DApplyExpr & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DConstant & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DConstant & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DConstant & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DConstant & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DLambdaExpr & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DVarRef & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DVarRef & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DVarRef & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DVarRef & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DLocalSymtab & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DTypename & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DTypename & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DTypename & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DTypename & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace xo {
|
||||||
/** move instance using allocator **/
|
/** move instance using allocator **/
|
||||||
static Opaque shallow_move(DVariable & self, obj<ACollector> gc) noexcept;
|
static Opaque shallow_move(DVariable & self, obj<ACollector> gc) noexcept;
|
||||||
/** during GC: forward immdiate children **/
|
/** during GC: forward immdiate children **/
|
||||||
static size_type forward_children(DVariable & self, obj<ACollector> gc) noexcept;
|
static void forward_children(DVariable & self, obj<ACollector> gc) noexcept;
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,14 @@ namespace xo {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DGlobalSymtab::DGlobalSymtab(DGlobalSymtab && other)
|
||||||
|
: var_map_{std::move(other.var_map_)},
|
||||||
|
vars_{std::move(other.vars_)},
|
||||||
|
type_map_{std::move(other.type_map_)},
|
||||||
|
types_{std::move(other.types_)}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
DGlobalSymtab *
|
DGlobalSymtab *
|
||||||
DGlobalSymtab::_make(obj<AAllocator> mm,
|
DGlobalSymtab::_make(obj<AAllocator> mm,
|
||||||
obj<AAllocator> aux_mm,
|
obj<AAllocator> aux_mm,
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DApplyExpr::forward_children(DApplyExpr & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DApplyExpr::forward_children(DApplyExpr & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DConstant::forward_children(DConstant & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DConstant::forward_children(DConstant & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DDefineExpr::forward_children(DDefineExpr & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DDefineExpr::forward_children(DDefineExpr & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DGlobalSymtab::forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DGlobalSymtab::forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DIfElseExpr::forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DIfElseExpr::forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DLambdaExpr::forward_children(DLambdaExpr & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DLambdaExpr::forward_children(DLambdaExpr & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DLocalSymtab::forward_children(DLocalSymtab & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DLocalSymtab::forward_children(DLocalSymtab & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DSequenceExpr::forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DSequenceExpr::forward_children(DSequenceExpr & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DTypename::forward_children(DTypename & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DTypename::forward_children(DTypename & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DVarRef::forward_children(DVarRef & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DVarRef::forward_children(DVarRef & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
||||||
return self.shallow_move(gc);
|
return self.shallow_move(gc);
|
||||||
}
|
}
|
||||||
auto
|
auto
|
||||||
IGCObject_DVariable::forward_children(DVariable & self, obj<ACollector> gc) noexcept -> size_type
|
IGCObject_DVariable::forward_children(DVariable & self, obj<ACollector> gc) noexcept -> void
|
||||||
{
|
{
|
||||||
return self.forward_children(gc);
|
self.forward_children(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue