diff --git a/include/xo/interpreter2/DClosure.hpp b/include/xo/interpreter2/DClosure.hpp index 8472cfc5..8462d412 100644 --- a/include/xo/interpreter2/DClosure.hpp +++ b/include/xo/interpreter2/DClosure.hpp @@ -19,9 +19,9 @@ namespace xo { class DClosure { public: using ARuntimeContext = xo::scm::ARuntimeContext; - //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; using size_type = std::int32_t; @@ -59,7 +59,7 @@ namespace xo { ///@{ DClosure * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} /** @defgroup scm-closure-printable-facet **/ diff --git a/include/xo/interpreter2/DLocalEnv.hpp b/include/xo/interpreter2/DLocalEnv.hpp index e60727b0..4cbe3f7d 100644 --- a/include/xo/interpreter2/DLocalEnv.hpp +++ b/include/xo/interpreter2/DLocalEnv.hpp @@ -16,9 +16,9 @@ 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; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; using size_type = std::uint32_t; @@ -56,7 +56,7 @@ namespace xo { ///@{ DLocalEnv * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} /** @defgroup scm-localenv-printable-facet **/ diff --git a/include/xo/interpreter2/DVsmApplyClosureFrame.hpp b/include/xo/interpreter2/DVsmApplyClosureFrame.hpp index 66cbf81a..b13ed03a 100644 --- a/include/xo/interpreter2/DVsmApplyClosureFrame.hpp +++ b/include/xo/interpreter2/DVsmApplyClosureFrame.hpp @@ -21,6 +21,7 @@ namespace xo { using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; @@ -42,7 +43,7 @@ namespace xo { /** gcobject facet **/ std::size_t shallow_size() const noexcept; DVsmApplyClosureFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; /** pretty-printing support **/ bool pretty(const ppindentinfo & ppii) const; diff --git a/include/xo/interpreter2/DVsmApplyFrame.hpp b/include/xo/interpreter2/DVsmApplyFrame.hpp index 60a572aa..147b4857 100644 --- a/include/xo/interpreter2/DVsmApplyFrame.hpp +++ b/include/xo/interpreter2/DVsmApplyFrame.hpp @@ -14,9 +14,9 @@ namespace xo { class DVsmApplyFrame { public: using AProcedure = xo::scm::AProcedure; - //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; @@ -39,7 +39,7 @@ namespace xo { void assign_fn(obj x) { this->fn_ = x; } DVsmApplyFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; /** pretty-printing support **/ bool pretty(const ppindentinfo & ppii) const; diff --git a/include/xo/interpreter2/DVsmDefContFrame.hpp b/include/xo/interpreter2/DVsmDefContFrame.hpp index 79a9227c..3174a59f 100644 --- a/include/xo/interpreter2/DVsmDefContFrame.hpp +++ b/include/xo/interpreter2/DVsmDefContFrame.hpp @@ -15,8 +15,8 @@ namespace xo { **/ class DVsmDefContFrame { public: - //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using AGCObject = xo::mm::AGCObject; using ppindentinfo = xo::print::ppindentinfo; @@ -52,7 +52,7 @@ namespace xo { ///@{ DVsmDefContFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} /** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/ diff --git a/include/xo/interpreter2/DVsmEvalArgsFrame.hpp b/include/xo/interpreter2/DVsmEvalArgsFrame.hpp index 34d74b9a..bc556a9e 100644 --- a/include/xo/interpreter2/DVsmEvalArgsFrame.hpp +++ b/include/xo/interpreter2/DVsmEvalArgsFrame.hpp @@ -14,9 +14,9 @@ namespace xo { /** frame for executing an apply expression **/ class DVsmEvalArgsFrame { public: - //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; @@ -44,7 +44,7 @@ namespace xo { int32_t increment_arg() { return ++i_arg_; } DVsmEvalArgsFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; bool pretty(const ppindentinfo & ppii) const; diff --git a/include/xo/interpreter2/DVsmIfElseContFrame.hpp b/include/xo/interpreter2/DVsmIfElseContFrame.hpp index 4d3176dc..355e4214 100644 --- a/include/xo/interpreter2/DVsmIfElseContFrame.hpp +++ b/include/xo/interpreter2/DVsmIfElseContFrame.hpp @@ -15,9 +15,9 @@ namespace xo { **/ class DVsmIfElseContFrame { public: - //using ACollector = xo::mm::ACollector; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using AGCObject = xo::mm::AGCObject; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; @@ -52,7 +52,7 @@ namespace xo { ///@{ DVsmIfElseContFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} /** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/ diff --git a/include/xo/interpreter2/DVsmSeqContFrame.hpp b/include/xo/interpreter2/DVsmSeqContFrame.hpp index 6b141cc6..f4412843 100644 --- a/include/xo/interpreter2/DVsmSeqContFrame.hpp +++ b/include/xo/interpreter2/DVsmSeqContFrame.hpp @@ -15,10 +15,10 @@ namespace xo { **/ class DVsmSeqContFrame { public: - //using ACollector = xo::mm::ACollector; - using AAllocator = xo::mm::AAllocator; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; + using AAllocator = xo::mm::AAllocator; using ppindentinfo = xo::print::ppindentinfo; public: @@ -57,7 +57,7 @@ namespace xo { ///@{ DVsmSeqContFrame * gco_shallow_move(obj gc) noexcept; - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} /** @defgrouop scm-vsmseqcontframe-printable-facet printable facet **/ diff --git a/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp b/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp index 215515ac..972cbbbd 100644 --- a/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp +++ b/include/xo/interpreter2/define/IGCObject_DVsmDefContFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmDefContFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmDefContFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/detail/IGCObject_DClosure.hpp b/include/xo/interpreter2/detail/IGCObject_DClosure.hpp index 6e6058dd..e7326396 100644 --- a/include/xo/interpreter2/detail/IGCObject_DClosure.hpp +++ b/include/xo/interpreter2/detail/IGCObject_DClosure.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DClosure & self, obj fn) noexcept; + static void visit_gco_children(DClosure & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp b/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp index 9a021127..1113a679 100644 --- a/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp +++ b/include/xo/interpreter2/detail/IGCObject_DVsmApplyClosureFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmApplyClosureFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmApplyClosureFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp b/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp index 2936f81e..469d3a0c 100644 --- a/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp +++ b/include/xo/interpreter2/detail/IGCObject_DVsmApplyFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmApplyFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmApplyFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp b/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp index 15a09267..0a3ce07f 100644 --- a/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp +++ b/include/xo/interpreter2/detail/IGCObject_DVsmEvalArgsFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmEvalArgsFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmEvalArgsFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp b/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp index 29484934..84207c36 100644 --- a/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp +++ b/include/xo/interpreter2/env/IGCObject_DLocalEnv.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DLocalEnv & self, obj fn) noexcept; + static void visit_gco_children(DLocalEnv & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp b/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp index 6812b6a0..ff3545a1 100644 --- a/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp +++ b/include/xo/interpreter2/ifelse/IGCObject_DVsmIfElseContFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmIfElseContFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmIfElseContFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp b/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp index 9b299d82..907e3fb2 100644 --- a/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp +++ b/include/xo/interpreter2/sequence/IGCObject_DVsmSeqContFrame.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVsmSeqContFrame & self, obj fn) noexcept; + static void visit_gco_children(DVsmSeqContFrame & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp b/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp index 1b386aaa..2902840c 100644 --- a/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp +++ b/include/xo/interpreter2/vsm/DVirtualSchematikaMachine.hpp @@ -71,9 +71,9 @@ namespace xo { public: // will be DArenaVector> probably using Stack = void *; - //using ACollector = xo::mm::ACollector; using AGCObject = xo::mm::AGCObject; using AGCObjectVisitor = xo::mm::AGCObjectVisitor; + using VisitReason = xo::mm::VisitReason; using AAllocator = xo::mm::AAllocator; using MemorySizeVisitor = xo::mm::MemorySizeVisitor; using span_type = xo::mm::span; @@ -158,7 +158,7 @@ namespace xo { /** forward gc-aware child pointers **/ - void visit_gco_children(obj gc) noexcept; + void visit_gco_children(VisitReason reason, obj gc) noexcept; ///@} diff --git a/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp b/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp index c7d1d1f7..85faa8ee 100644 --- a/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp +++ b/include/xo/interpreter2/vsm/IGCObject_DVirtualSchematikaMachine.hpp @@ -45,6 +45,7 @@ namespace xo { using AAllocator = xo::mm::AGCObject::AAllocator; using ACollector = xo::mm::AGCObject::ACollector; using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor; + using VisitReason = xo::mm::AGCObject::VisitReason; using Copaque = xo::mm::AGCObject::Copaque; using Opaque = xo::mm::AGCObject::Opaque; ///@} @@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/ /** Invoke fn.visit_child(iface,data) for each child GCObject pointer. Context: provides address of data pointer so it can be updated in place when @p fn invokes garbage collector reentry point **/ - static void visit_gco_children(DVirtualSchematikaMachine & self, obj fn) noexcept; + static void visit_gco_children(DVirtualSchematikaMachine & self, VisitReason reason, obj fn) noexcept; ///@} }; diff --git a/src/interpreter2/DClosure.cpp b/src/interpreter2/DClosure.cpp index 684eb5d0..c7bb3140 100644 --- a/src/interpreter2/DClosure.cpp +++ b/src/interpreter2/DClosure.cpp @@ -70,10 +70,11 @@ namespace xo { } void - DClosure::visit_gco_children(obj gc) noexcept + DClosure::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&lambda_); - gc.visit_child(&env_); + gc.visit_child(reason, &lambda_); + gc.visit_child(reason, &env_); } // ----- printable facet ----- diff --git a/src/interpreter2/DLocalEnv.cpp b/src/interpreter2/DLocalEnv.cpp index e0fe0e79..0e805d1b 100644 --- a/src/interpreter2/DLocalEnv.cpp +++ b/src/interpreter2/DLocalEnv.cpp @@ -97,23 +97,12 @@ namespace xo { } void - DLocalEnv::visit_gco_children(obj gc) noexcept + DLocalEnv::visit_gco_children(VisitReason reason, + obj gc) noexcept { - { - gc.visit_child(&parent_); - //auto iface = xo::facet::impl_for(); - //gc.forward_inplace(&iface, (void **)(&parent_)); - } - { - gc.visit_child(&symtab_); - //auto iface = xo::facet::impl_for(); - //gc.forward_inplace(&iface, (void **)(&symtab_)); - } - { - gc.visit_child(&args_); - //auto iface = xo::facet::impl_for(); - //gc.forward_inplace(&iface, (void **)(&args_)); - } + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &symtab_); + gc.visit_child(reason, &args_); } // ----- printable facet ----- diff --git a/src/interpreter2/DVirtualSchematikaMachine.cpp b/src/interpreter2/DVirtualSchematikaMachine.cpp index 01c56698..c7e864c6 100644 --- a/src/interpreter2/DVirtualSchematikaMachine.cpp +++ b/src/interpreter2/DVirtualSchematikaMachine.cpp @@ -972,18 +972,19 @@ namespace xo { } void - DVirtualSchematikaMachine::visit_gco_children(obj gc) noexcept + DVirtualSchematikaMachine::visit_gco_children(VisitReason reason, + obj gc) noexcept { - reader_.visit_gco_children(gc); + reader_.visit_gco_children(reason, gc); - gc.visit_child(&stack_); - gc.visit_poly_child(&expr_); - gc.visit_child(&global_env_); - gc.visit_child(&local_env_); - gc.visit_child(&fn_); - gc.visit_child(&args_); + gc.visit_child(reason, &stack_); + gc.visit_poly_child(reason, &expr_); + gc.visit_child(reason, &global_env_); + gc.visit_child(reason, &local_env_); + gc.visit_child(reason, &fn_); + gc.visit_child(reason, &args_); if (value_.is_value()) { - gc.visit_child(const_cast *>(&value_.value_ref())); + gc.visit_child(reason, const_cast *>(&value_.value_ref())); } } diff --git a/src/interpreter2/DVsmApplyClosureFrame.cpp b/src/interpreter2/DVsmApplyClosureFrame.cpp index dbb1601c..55199464 100644 --- a/src/interpreter2/DVsmApplyClosureFrame.cpp +++ b/src/interpreter2/DVsmApplyClosureFrame.cpp @@ -39,10 +39,11 @@ namespace xo { } void - DVsmApplyClosureFrame::visit_gco_children(obj gc) noexcept + DVsmApplyClosureFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&stack_); - gc.visit_child(&local_env_); + gc.visit_child(reason, &stack_); + gc.visit_child(reason, &local_env_); } bool diff --git a/src/interpreter2/DVsmApplyFrame.cpp b/src/interpreter2/DVsmApplyFrame.cpp index 19db4bdf..591d8aef 100644 --- a/src/interpreter2/DVsmApplyFrame.cpp +++ b/src/interpreter2/DVsmApplyFrame.cpp @@ -47,11 +47,12 @@ namespace xo { } void - DVsmApplyFrame::visit_gco_children(obj gc) noexcept + DVsmApplyFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&parent_); - gc.visit_child(&fn_); - gc.visit_child(&args_); + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &fn_); + gc.visit_child(reason, &args_); } bool diff --git a/src/interpreter2/DVsmDefContFrame.cpp b/src/interpreter2/DVsmDefContFrame.cpp index 97b12ab0..d8c52d10 100644 --- a/src/interpreter2/DVsmDefContFrame.cpp +++ b/src/interpreter2/DVsmDefContFrame.cpp @@ -38,10 +38,11 @@ namespace xo { } void - DVsmDefContFrame::visit_gco_children(obj gc) noexcept + DVsmDefContFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&parent_); - gc.visit_child(&def_expr_); + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &def_expr_); } // printable facet diff --git a/src/interpreter2/DVsmEvalArgsFrame.cpp b/src/interpreter2/DVsmEvalArgsFrame.cpp index 42d44de5..b4e3f448 100644 --- a/src/interpreter2/DVsmEvalArgsFrame.cpp +++ b/src/interpreter2/DVsmEvalArgsFrame.cpp @@ -48,10 +48,11 @@ namespace xo { } void - DVsmEvalArgsFrame::visit_gco_children(obj gc) noexcept + DVsmEvalArgsFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&parent_); - gc.visit_child(&apply_expr_); + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &apply_expr_); } bool diff --git a/src/interpreter2/DVsmIfElseContFrame.cpp b/src/interpreter2/DVsmIfElseContFrame.cpp index a82206bc..f1f88952 100644 --- a/src/interpreter2/DVsmIfElseContFrame.cpp +++ b/src/interpreter2/DVsmIfElseContFrame.cpp @@ -36,10 +36,11 @@ namespace xo { } void - DVsmIfElseContFrame::visit_gco_children(obj gc) noexcept + DVsmIfElseContFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&parent_); - gc.visit_child(&ifelse_expr_); + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &ifelse_expr_); } // printable facet diff --git a/src/interpreter2/DVsmSeqContFrame.cpp b/src/interpreter2/DVsmSeqContFrame.cpp index cb031b18..219342b5 100644 --- a/src/interpreter2/DVsmSeqContFrame.cpp +++ b/src/interpreter2/DVsmSeqContFrame.cpp @@ -39,10 +39,11 @@ namespace xo { } void - DVsmSeqContFrame::visit_gco_children(obj gc) noexcept + DVsmSeqContFrame::visit_gco_children(VisitReason reason, + obj gc) noexcept { - gc.visit_child(&parent_); - gc.visit_child(&seq_expr_); + gc.visit_child(reason, &parent_); + gc.visit_child(reason, &seq_expr_); } // printable facet diff --git a/src/interpreter2/IGCObject_DClosure.cpp b/src/interpreter2/IGCObject_DClosure.cpp index be0c9903..dc281fd4 100644 --- a/src/interpreter2/IGCObject_DClosure.cpp +++ b/src/interpreter2/IGCObject_DClosure.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DClosure::visit_gco_children(DClosure & self, obj fn) noexcept -> void + IGCObject_DClosure::visit_gco_children(DClosure & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp b/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp index 5fcb724a..e080c301 100644 --- a/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmApplyClosureFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, obj fn) noexcept -> void + IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmApplyFrame.cpp b/src/interpreter2/IGCObject_DVsmApplyFrame.cpp index 4e8adef7..b0ce1838 100644 --- a/src/interpreter2/IGCObject_DVsmApplyFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmApplyFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, obj fn) noexcept -> void + IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmDefContFrame.cpp b/src/interpreter2/IGCObject_DVsmDefContFrame.cpp index 60cb90d0..c0ed5412 100644 --- a/src/interpreter2/IGCObject_DVsmDefContFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmDefContFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, obj fn) noexcept -> void + IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp b/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp index c9697c90..0db77058 100644 --- a/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmEvalArgsFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, obj fn) noexcept -> void + IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp b/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp index d8fa856d..3488e8c3 100644 --- a/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmIfElseContFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, obj fn) noexcept -> void + IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp b/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp index aa004bce..5293306f 100644 --- a/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp +++ b/src/interpreter2/IGCObject_DVsmSeqContFrame.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, obj fn) noexcept -> void + IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/facet/IGCObject_DLocalEnv.cpp b/src/interpreter2/facet/IGCObject_DLocalEnv.cpp index eb107a81..f086b07a 100644 --- a/src/interpreter2/facet/IGCObject_DLocalEnv.cpp +++ b/src/interpreter2/facet/IGCObject_DLocalEnv.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, obj fn) noexcept -> void + IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/ diff --git a/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp b/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp index c894ec35..4b9d83bb 100644 --- a/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp +++ b/src/interpreter2/facet/IGCObject_DVirtualSchematikaMachine.cpp @@ -21,9 +21,9 @@ namespace xo { return self.gco_shallow_move(gc); } auto - IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, obj fn) noexcept -> void + IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, VisitReason reason, obj fn) noexcept -> void { - self.visit_gco_children(fn); + self.visit_gco_children(reason, fn); } } /*namespace scm*/