xo-interpreter2 stack: + reason arg to visit_gco_children()

Helps streamline DX1Collector in xo-gc/.
Want both forward and verify entry points for the same
representation.
This commit is contained in:
Roland Conybeare 2026-04-10 01:10:03 -04:00
commit dc31e0f772
10 changed files with 55 additions and 35 deletions

View file

@ -274,20 +274,13 @@ namespace xo {
/** Execute gc immediately, for all generations < @p upto **/
void execute_gc(Generation upto) noexcept;
#ifdef OBSOLETE // replaced by visit_child()
/** Evacuate object at @p *lhs_data to to-space.
* Replace original with forwarding pointer to new location
**/
void forward_inplace(AGCObject * lhs_iface, void ** lhs_data);
#endif
/** Supports GCObjectVisitor facet.
* During gc phase:
* During gc phase (@p reason is 'forward')
* 1. evacuate object at @p *lhs_data to to-space.
* 2. replace @p *lhs_data with forwarding pointer
* to new location.
**/
void visit_child(AGCObject * lhs_iface, void ** lhs_data);
void visit_child(VisitReason reason, AGCObject * lhs_iface, void ** lhs_data);
// ----- allocation -----

View file

@ -58,7 +58,7 @@ Source must be owned by this collector.
Increments object age **/
static void * alloc_copy(DX1Collector & self, std::byte * src);
/** visit child of a gc-aware object. May update child in-place! **/
static void visit_child(DX1Collector & self, AGCObject * iface, void ** pp_data) noexcept;
static void visit_child(DX1Collector & self, VisitReason reason, AGCObject * iface, void ** pp_data) noexcept;
///@}
};