xo-gc: refactor: move forward_inplace_aux() to GCObjectStore

This commit is contained in:
Roland Conybeare 2026-04-03 15:53:25 -04:00
commit 99593c4d72
4 changed files with 217 additions and 8 deletions

View file

@ -392,7 +392,8 @@ namespace xo {
/** Evacuate object at @p *lhs_data to to-space.
* Replace original with forwarding pointer to new location
**/
void _forward_inplace_aux(AGCObject * lhs_iface, void ** lhs_data);
void _forward_inplace_aux(AGCObject * lhs_iface, void ** lhs_data, Generation upto);
/** Verify that pointer {@p iface, @p data} is valid:
* destination either in to-space, or somewhere outside this collector
**/

View file

@ -135,6 +135,18 @@ namespace xo {
void * gco_data,
Generation upto) const noexcept;
/** Evacuate object at @p *lhs_data to to-space, during collection phase
* acting on generations g in [0 ,.., upto).
* Need @p gc to pass to invoke AGCObject methods shallow_copy() and
* forward_children()
*
* Replace original with forwarding pointer to new location
**/
void _forward_inplace_aux(DX1Collector * gc,
AGCObject * lhs_iface,
void ** lhs_data,
Generation upto);
/** For each generation g in [0 ,.., upto)
* swap arenas assigned to {to-space, from-space}.
* Invoked once at the beginning of each gc cycle.