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
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/indentlog/print/ppindentinfo.hpp>
|
||||
#include <string_view>
|
||||
|
|
@ -47,6 +48,8 @@ namespace xo {
|
|||
using AAllocator = xo::mm::AAllocator;
|
||||
/** garbage collector **/
|
||||
using ACollector = xo::mm::ACollector;
|
||||
/** object visitor (garbage collector proxy) **/
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
/** ppindentinfo for APrintable **/
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
///@}
|
||||
|
|
@ -247,10 +250,10 @@ namespace xo {
|
|||
/** clone string, using memory from allocator @p mm **/
|
||||
DString * shallow_move(obj<ACollector> gc) noexcept;
|
||||
|
||||
size_type forward_children(obj<ACollector> gc) noexcept;
|
||||
/** fixup child pointers (trivial for DString, no children)
|
||||
* note: cref so we can use forward decl
|
||||
**/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue