refactor: rename GCObject.shallow_copy -> shallow_move
resolve conflict since relying on move constructor in std_copy_for
This commit is contained in:
parent
761bff734e
commit
bd88f441fc
36 changed files with 54 additions and 54 deletions
|
|
@ -58,7 +58,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DClosure * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DClosure * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DLocalEnv * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DLocalEnv * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace xo {
|
|||
|
||||
/** gcobject facet **/
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmApplyClosureFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmApplyClosureFrame * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
/** pretty-printing support **/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace xo {
|
|||
void assign_fn(obj<AGCObject> x) { this->fn_ = x; }
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmApplyFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmApplyFrame * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
/** pretty-printing support **/
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmDefContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
DVsmDefContFrame * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace xo {
|
|||
int32_t increment_arg() { return ++i_arg_; }
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmEvalArgsFrame * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVsmEvalArgsFrame * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmIfElseContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
DVsmIfElseContFrame * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DVsmSeqContFrame * shallow_copy(obj<AAllocator> mm) noexcept;
|
||||
DVsmSeqContFrame * shallow_move(obj<AAllocator> mm) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmDefContFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmDefContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmDefContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmDefContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DClosure & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DClosure & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DClosure & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DClosure & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmApplyClosureFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmApplyClosureFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmApplyClosureFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmApplyFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmApplyFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmApplyFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmApplyFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmEvalArgsFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmEvalArgsFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmEvalArgsFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DLocalEnv & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DLocalEnv & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DLocalEnv & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmIfElseContFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmIfElseContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmIfElseContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVsmSeqContFrame & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVsmSeqContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVsmSeqContFrame & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace xo {
|
|||
/** shallow copy during gc cycle. Not implemented! Only intending to support
|
||||
* VSM as virtual root
|
||||
**/
|
||||
DVirtualSchematikaMachine * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
DVirtualSchematikaMachine * shallow_move(obj<AAllocator> mm) const noexcept;
|
||||
|
||||
/** forward gc-aware child pointers
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace xo {
|
|||
static size_type shallow_size(const DVirtualSchematikaMachine & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(DVirtualSchematikaMachine & self, obj<AAllocator> mm) noexcept;
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DVirtualSchematikaMachine & self, obj<AAllocator> mm) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DClosure *
|
||||
DClosure::shallow_copy(obj<AAllocator> mm) const noexcept {
|
||||
DClosure::shallow_move(obj<AAllocator> mm) const noexcept {
|
||||
DClosure * copy = (DClosure *)mm.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DLocalEnv *
|
||||
DLocalEnv::shallow_copy(obj<AAllocator> mm) const noexcept {
|
||||
DLocalEnv::shallow_move(obj<AAllocator> mm) const noexcept {
|
||||
DLocalEnv * copy = (DLocalEnv *)mm.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy)
|
||||
|
|
|
|||
|
|
@ -954,7 +954,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVirtualSchematikaMachine *
|
||||
DVirtualSchematikaMachine::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
DVirtualSchematikaMachine::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
(void)mm;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmApplyClosureFrame *
|
||||
DVsmApplyClosureFrame::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
DVsmApplyClosureFrame::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
DVsmApplyClosureFrame * copy
|
||||
= (DVsmApplyClosureFrame *)mm.alloc_copy((std::byte *)this);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmApplyFrame *
|
||||
DVsmApplyFrame::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
DVsmApplyFrame::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
DVsmApplyFrame * copy = (DVsmApplyFrame *)mm.alloc_copy((std::byte *)this);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmDefContFrame *
|
||||
DVsmDefContFrame::shallow_copy(obj<AAllocator> mm) noexcept
|
||||
DVsmDefContFrame::shallow_move(obj<AAllocator> mm) noexcept
|
||||
{
|
||||
return mm.std_copy_for<DVsmDefContFrame>(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmEvalArgsFrame *
|
||||
DVsmEvalArgsFrame::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
DVsmEvalArgsFrame::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
DVsmEvalArgsFrame * copy
|
||||
= (DVsmEvalArgsFrame *)mm.alloc_copy((std::byte *)this);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmIfElseContFrame *
|
||||
DVsmIfElseContFrame::shallow_copy(obj<AAllocator> mm) noexcept
|
||||
DVsmIfElseContFrame::shallow_move(obj<AAllocator> mm) noexcept
|
||||
{
|
||||
return mm.std_copy_for<DVsmIfElseContFrame>(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
DVsmSeqContFrame *
|
||||
DVsmSeqContFrame::shallow_copy(obj<AAllocator> mm) noexcept
|
||||
DVsmSeqContFrame::shallow_move(obj<AAllocator> mm) noexcept
|
||||
{
|
||||
return mm.std_copy_for<DVsmSeqContFrame>(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DClosure::shallow_copy(DClosure & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DClosure::shallow_move(DClosure & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DClosure::forward_children(DClosure & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmApplyClosureFrame::shallow_copy(DVsmApplyClosureFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmApplyClosureFrame::shallow_move(DVsmApplyClosureFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyClosureFrame::forward_children(DVsmApplyClosureFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmApplyFrame::shallow_copy(DVsmApplyFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmApplyFrame::shallow_move(DVsmApplyFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyFrame::forward_children(DVsmApplyFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmDefContFrame::shallow_copy(DVsmDefContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmDefContFrame::shallow_move(DVsmDefContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmDefContFrame::forward_children(DVsmDefContFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmEvalArgsFrame::shallow_copy(DVsmEvalArgsFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmEvalArgsFrame::shallow_move(DVsmEvalArgsFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmEvalArgsFrame::forward_children(DVsmEvalArgsFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmIfElseContFrame::shallow_copy(DVsmIfElseContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmIfElseContFrame::shallow_move(DVsmIfElseContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmIfElseContFrame::forward_children(DVsmIfElseContFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVsmSeqContFrame::shallow_copy(DVsmSeqContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVsmSeqContFrame::shallow_move(DVsmSeqContFrame & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmSeqContFrame::forward_children(DVsmSeqContFrame & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DLocalEnv::shallow_copy(DLocalEnv & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DLocalEnv::shallow_move(DLocalEnv & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DLocalEnv::forward_children(DLocalEnv & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
auto
|
||||
IGCObject_DVirtualSchematikaMachine::shallow_copy(DVirtualSchematikaMachine & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
IGCObject_DVirtualSchematikaMachine::shallow_move(DVirtualSchematikaMachine & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
return self.shallow_move(mm);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVirtualSchematikaMachine::forward_children(DVirtualSchematikaMachine & self, obj<ACollector> gc) noexcept -> size_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue