refactor focusing on xo-alloc2/ xo-gc/ write-barrier

ability to inform allocator of gco->gco mutation, via AAllocator i/face.
This commit is contained in:
Roland Conybeare 2026-05-01 19:54:26 -04:00
commit a8397c78d7
4 changed files with 9 additions and 7 deletions

View file

@ -63,7 +63,9 @@ namespace xo {
}
void
DLocalEnv::assign_value(Binding ix, obj<AGCObject> x)
DLocalEnv::assign_value(obj<AAllocator> mm,
Binding ix,
obj<AGCObject> x)
{
scope log(XO_DEBUG(true));
@ -79,8 +81,7 @@ namespace xo {
auto j = ix.j_slot();
if (j < static_cast<decltype(j)>(env->n_vars())) {
log && log("STUB: need write barrier for GC here");
(*(env->args_))[j] = x;
env->args_->assign_at(mm, j, x);
} else {
assert(false);
}

View file

@ -821,9 +821,9 @@ namespace xo {
log && log(xtag("i_arg", i_arg), xtag("n_arg", args->size()), xtag("cap", args->capacity()));
auto gc = mm_.to_op().to_facet<ACollector>();
//auto gc = mm_.to_op().to_facet<ACollector>();
args->push_back(gc, value);
args->push_back(mm_.to_op(), value);
i_arg = evalargs_frame->increment_arg();