refactor: rename RCollector.std_copy_for -> std_move_for

This commit is contained in:
Roland Conybeare 2026-04-04 16:37:17 -04:00
commit 5172de7862
37 changed files with 37 additions and 37 deletions

View file

@ -55,7 +55,7 @@ public:
/** convenience template for move-constructible T (this is common) **/
template <typename T>
T * std_copy_for(T * src) noexcept {
T * std_move_for(T * src) noexcept {
void * mem = this->alloc_copy_for(src);
if (mem) {
return new (mem) T(std::move(*src));

View file

@ -80,7 +80,7 @@ namespace xo {
DConstant *
DConstant::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -87,7 +87,7 @@ namespace xo {
DDefineExpr *
DDefineExpr::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -263,7 +263,7 @@ namespace xo {
DGlobalSymtab *
DGlobalSymtab::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -91,7 +91,7 @@ namespace xo {
DIfElseExpr *
DIfElseExpr::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -141,7 +141,7 @@ namespace xo {
DLambdaExpr *
DLambdaExpr::shallow_move(obj<ACollector> gc) noexcept {
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -121,7 +121,7 @@ namespace xo {
DLocalSymtab *
DLocalSymtab::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -122,7 +122,7 @@ namespace xo {
DSequenceExpr *
DSequenceExpr::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -49,7 +49,7 @@ namespace xo {
DTypename *
DTypename::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
size_t

View file

@ -67,7 +67,7 @@ namespace xo {
DVarRef *
DVarRef::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -47,7 +47,7 @@ namespace xo {
DVariable *
DVariable::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
size_t

View file

@ -71,7 +71,7 @@ namespace xo {
DClosure *
DClosure::shallow_move(obj<ACollector> gc) noexcept {
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -98,7 +98,7 @@ namespace xo {
DLocalEnv *
DLocalEnv::shallow_move(obj<ACollector> gc) noexcept {
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -958,7 +958,7 @@ namespace xo {
{
(void)gc;
/** TODO: should be able to use gc.std_copy_for(this) now
/** TODO: should be able to use gc.std_move_for(this) now
* that shallow_move uses move construction.
* DVirtualSchematikaMachine is (or can be made) moveable.
**/

View file

@ -41,7 +41,7 @@ namespace xo {
DVsmApplyClosureFrame *
DVsmApplyClosureFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -49,7 +49,7 @@ namespace xo {
DVsmApplyFrame *
DVsmApplyFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -40,7 +40,7 @@ namespace xo {
DVsmDefContFrame *
DVsmDefContFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for<DVsmDefContFrame>(this);
return gc.std_move_for<DVsmDefContFrame>(this);
}
std::size_t

View file

@ -50,7 +50,7 @@ namespace xo {
DVsmEvalArgsFrame *
DVsmEvalArgsFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -38,7 +38,7 @@ namespace xo {
DVsmIfElseContFrame *
DVsmIfElseContFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for<DVsmIfElseContFrame>(this);
return gc.std_move_for<DVsmIfElseContFrame>(this);
}
std::size_t

View file

@ -41,7 +41,7 @@ namespace xo {
DVsmSeqContFrame *
DVsmSeqContFrame::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for<DVsmSeqContFrame>(this);
return gc.std_move_for<DVsmSeqContFrame>(this);
}
std::size_t

View file

@ -183,7 +183,7 @@ namespace xo {
DArray *
DArray::shallow_move(obj<ACollector> gc) noexcept
{
// note: not using gc.std_copy_for() here.
// note: not using gc.std_move_for() here.
// flexible array -> compiler doesn't know actual DArray allocation size
DArray * copy = (DArray *)gc.alloc_copy((std::byte *)this);

View file

@ -38,7 +38,7 @@ namespace xo {
DBoolean *
DBoolean::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
size_t

View file

@ -276,7 +276,7 @@ namespace xo {
DDictionary *
DDictionary::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -36,7 +36,7 @@ namespace xo {
DFloat *
DFloat::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
size_t

View file

@ -36,7 +36,7 @@ namespace xo {
DInteger *
DInteger::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
size_t

View file

@ -187,7 +187,7 @@ namespace xo {
DList *
DList::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
auto

View file

@ -61,7 +61,7 @@ namespace xo {
DRuntimeError *
DRuntimeError::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -199,7 +199,7 @@ namespace xo {
template <typename Fn>
Primitive<Fn> *
Primitive<Fn>::shallow_move(obj<ACollector> gc) noexcept {
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
template <typename Fn>

View file

@ -116,7 +116,7 @@ namespace xo {
DGlobalEnv *
DGlobalEnv::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for<DGlobalEnv>(this);
return gc.std_move_for<DGlobalEnv>(this);
}
std::size_t

View file

@ -195,7 +195,7 @@ namespace xo {
{
(void)gc;
/** TODO: may be feasible to use gc.std_copy_for(this)
/** TODO: may be feasible to use gc.std_move_for(this)
* if/when DSchematikaParser is moveable
**/
assert(false);

View file

@ -158,7 +158,7 @@ namespace xo {
DString *
DString::shallow_move(obj<ACollector> gc) noexcept
{
// note: not using gc.std_copy_for() here
// note: not using gc.std_move_for() here
// b/c DString flexible array means not move-constructible
DString * copy = (DString *)gc.alloc_copy_for(this);

View file

@ -92,7 +92,7 @@ namespace xo {
{
// well-posed, but not expected to be used.
//
// Not using gc.std_copy_for() here because compiler doesn't know
// Not using gc.std_move_for() here because compiler doesn't know
// actual alloc size of a DUniqueString instance
assert(false);

View file

@ -85,7 +85,7 @@ namespace xo {
DArrayType *
DArrayType::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -63,7 +63,7 @@ namespace xo {
DAtomicType *
DAtomicType::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -96,7 +96,7 @@ namespace xo {
DFunctionType *
DFunctionType::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -90,7 +90,7 @@ namespace xo {
DListType *
DListType::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t

View file

@ -84,7 +84,7 @@ namespace xo {
DTypeVarRef *
DTypeVarRef::shallow_move(obj<ACollector> gc) noexcept
{
return gc.std_copy_for(this);
return gc.std_move_for(this);
}
std::size_t