refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
parent
327807331d
commit
72cbffba46
8 changed files with 25 additions and 15 deletions
|
|
@ -172,10 +172,10 @@ namespace xo {
|
|||
return copy;
|
||||
}
|
||||
|
||||
auto
|
||||
DString::forward_children(obj<ACollector>) noexcept -> size_type
|
||||
void
|
||||
DString::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
return shallow_size();
|
||||
// no-op. no children!
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DUniqueString::forward_children(obj<ACollector>) noexcept
|
||||
DUniqueString::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// no-op
|
||||
// no-op -- childless!
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DString::forward_children(DString & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DString::visit_gco_children(DString & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DUniqueString::forward_children(DUniqueString & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DUniqueString::visit_gco_children(DUniqueString & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue