refactor: make AGCObject.shallow_copy() non-const

prep for moving to ACollector interface
This commit is contained in:
Roland Conybeare 2026-04-04 14:38:14 -04:00
commit ef23bca2b1
2 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ namespace xo {
/** lookup interface from type sequence
* (can use tseq = typeseq::id<T>() for type T)
**/
const AGCObject * lookup_type(typeseq tseq) const noexcept;
AGCObject * lookup_type(typeseq tseq) const noexcept;
/** generation to which pointer @p addr belongs, given role @p r;
* sentinel if not found in this collector
@ -217,7 +217,7 @@ namespace xo {
* Shallow: does not traverse children
**/
void * _shallow_move(DX1Collector * gc,
const AGCObject * iface,
AGCObject * iface,
void * from_src);
private:

View file

@ -110,7 +110,7 @@ namespace xo {
return slot.is_occupied();
}
const AGCObject *
AGCObject *
GCObjectStore::lookup_type(typeseq tseq) const noexcept
{
scope log(XO_DEBUG(false));
@ -846,7 +846,7 @@ namespace xo {
GCMoveCheckpoint gray_lo_v = this->snap_move_checkpoint(upto);
//obj<AAllocator, DX1Collector> alloc(this);
const AGCObject * iface = lookup_type(tseq);
AGCObject * iface = this->lookup_type(tseq);
assert(iface->_has_null_vptr() == false);
@ -861,7 +861,7 @@ namespace xo {
void *
GCObjectStore::_shallow_move(DX1Collector * gc,
const AGCObject * iface,
AGCObject * iface,
void * from_src)
{
scope log(XO_DEBUG(config_.debug_flag_));