diff --git a/include/xo/interpreter2/DLocalEnv.hpp b/include/xo/interpreter2/DLocalEnv.hpp index 4cbe3f7d..a9253bbc 100644 --- a/include/xo/interpreter2/DLocalEnv.hpp +++ b/include/xo/interpreter2/DLocalEnv.hpp @@ -16,6 +16,7 @@ namespace xo { class DLocalEnv { public: using DArray = xo::scm::DArray; + using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using VisitReason = xo::mm::VisitReason; @@ -49,7 +50,7 @@ namespace xo { obj lookup_value(Binding ix) const noexcept; /** assign value associated with binding @p ix to @p x **/ - void assign_value(Binding ix, obj x); + void assign_value(obj mm, Binding ix, obj x); ///@} /** @defgroup scm-localenv-gcobject-facet **/ diff --git a/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp b/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp index 907e3fb2..f45f9d0b 100644 --- a/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp +++ b/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp @@ -67,4 +67,4 @@ when @p fn invokes garbage collector reentry point **/ } /*namespace scm*/ } /*namespace xo*/ -/* end */ \ No newline at end of file +/* end */ diff --git a/src/interpreter2/DLocalEnv.cpp b/src/interpreter2/DLocalEnv.cpp index 0e805d1b..6877f971 100644 --- a/src/interpreter2/DLocalEnv.cpp +++ b/src/interpreter2/DLocalEnv.cpp @@ -63,7 +63,9 @@ namespace xo { } void - DLocalEnv::assign_value(Binding ix, obj x) + DLocalEnv::assign_value(obj mm, + Binding ix, + obj x) { scope log(XO_DEBUG(true)); @@ -79,8 +81,7 @@ namespace xo { auto j = ix.j_slot(); if (j < static_cast(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); } diff --git a/src/interpreter2/DVirtualSchematikaMachine.cpp b/src/interpreter2/DVirtualSchematikaMachine.cpp index fc64e2e8..c8604e50 100644 --- a/src/interpreter2/DVirtualSchematikaMachine.cpp +++ b/src/interpreter2/DVirtualSchematikaMachine.cpp @@ -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(); + //auto gc = mm_.to_op().to_facet(); - args->push_back(gc, value); + args->push_back(mm_.to_op(), value); i_arg = evalargs_frame->increment_arg();