xo-gc: refactor: streamline GCObjectStore .forward_inplace_aux()
This commit is contained in:
parent
cd7adc3bb9
commit
033b83418c
4 changed files with 13 additions and 27 deletions
|
|
@ -279,13 +279,6 @@ namespace xo {
|
|||
**/
|
||||
void forward_inplace(AGCObject * lhs_iface, void ** lhs_data);
|
||||
|
||||
#ifdef OBSOLETE
|
||||
/** evacuate object with type @p iface at address @p from_src
|
||||
* to to-space. Return new to-space location.
|
||||
**/
|
||||
void * _shallow_move(const AGCObject * iface, void * from_src);
|
||||
#endif
|
||||
|
||||
/** true iff {alloc_hdr, object_data} should move for
|
||||
* currently-running collection.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -173,6 +173,13 @@ namespace xo {
|
|||
void * gco_data,
|
||||
Generation upto) const noexcept;
|
||||
|
||||
public:
|
||||
/** For each generation g in [0 ,.., upto)
|
||||
* swap arenas assigned to {to-space, from-space}.
|
||||
* Invoked once at the beginning of each gc cycle.
|
||||
**/
|
||||
void swap_roles(Generation upto) 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
|
||||
|
|
@ -180,17 +187,11 @@ namespace xo {
|
|||
*
|
||||
* Replace original with forwarding pointer to new location
|
||||
**/
|
||||
void _forward_inplace_aux(DX1Collector * gc,
|
||||
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.
|
||||
**/
|
||||
void swap_roles(Generation upto) noexcept;
|
||||
|
||||
/** Cleanup at the end of a gc cycle.
|
||||
* Reset from-space
|
||||
* (current from-space is former to-space,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue