refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
parent
57688a826a
commit
801bb9e39d
266 changed files with 952 additions and 947 deletions
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DString & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DString & self, obj<ACollector> gc) noexcept;
|
||||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DString & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue