xo-interpreter2 stack: + reason arg to visit_gco_children()
Helps streamline DX1Collector in xo-gc/. Want both forward and verify entry points for the same representation.
This commit is contained in:
parent
a312b5f20c
commit
895e8d7a34
36 changed files with 99 additions and 92 deletions
|
|
@ -70,10 +70,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DClosure::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DClosure::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&lambda_);
|
||||
gc.visit_child(&env_);
|
||||
gc.visit_child(reason, &lambda_);
|
||||
gc.visit_child(reason, &env_);
|
||||
}
|
||||
|
||||
// ----- printable facet -----
|
||||
|
|
|
|||
|
|
@ -97,23 +97,12 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DLocalEnv::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DLocalEnv::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
{
|
||||
gc.visit_child(&parent_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLocalEnv>();
|
||||
//gc.forward_inplace(&iface, (void **)(&parent_));
|
||||
}
|
||||
{
|
||||
gc.visit_child(&symtab_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DLocalSymtab>();
|
||||
//gc.forward_inplace(&iface, (void **)(&symtab_));
|
||||
}
|
||||
{
|
||||
gc.visit_child(&args_);
|
||||
//auto iface = xo::facet::impl_for<AGCObject,DArray>();
|
||||
//gc.forward_inplace(&iface, (void **)(&args_));
|
||||
}
|
||||
gc.visit_child(reason, &parent_);
|
||||
gc.visit_child(reason, &symtab_);
|
||||
gc.visit_child(reason, &args_);
|
||||
}
|
||||
|
||||
// ----- printable facet -----
|
||||
|
|
|
|||
|
|
@ -972,18 +972,19 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVirtualSchematikaMachine::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVirtualSchematikaMachine::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> 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<obj<AGCObject> *>(&value_.value_ref()));
|
||||
gc.visit_child(reason, const_cast<obj<AGCObject> *>(&value_.value_ref()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmApplyClosureFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmApplyClosureFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&stack_);
|
||||
gc.visit_child(&local_env_);
|
||||
gc.visit_child(reason, &stack_);
|
||||
gc.visit_child(reason, &local_env_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -47,11 +47,12 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmApplyFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmApplyFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> 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
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmDefContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmDefContFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&def_expr_);
|
||||
gc.visit_child(reason, &parent_);
|
||||
gc.visit_child(reason, &def_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -48,10 +48,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmEvalArgsFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmEvalArgsFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&apply_expr_);
|
||||
gc.visit_child(reason, &parent_);
|
||||
gc.visit_child(reason, &apply_expr_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmIfElseContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmIfElseContFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&ifelse_expr_);
|
||||
gc.visit_child(reason, &parent_);
|
||||
gc.visit_child(reason, &ifelse_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DVsmSeqContFrame::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DVsmSeqContFrame::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&parent_);
|
||||
gc.visit_child(&seq_expr_);
|
||||
gc.visit_child(reason, &parent_);
|
||||
gc.visit_child(reason, &seq_expr_);
|
||||
}
|
||||
|
||||
// printable facet
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DClosure::visit_gco_children(DClosure & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DClosure::visit_gco_children(DClosure & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmApplyClosureFrame::visit_gco_children(DVsmApplyClosureFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmApplyFrame::visit_gco_children(DVsmApplyFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmDefContFrame::visit_gco_children(DVsmDefContFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmEvalArgsFrame::visit_gco_children(DVsmEvalArgsFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmIfElseContFrame::visit_gco_children(DVsmIfElseContFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVsmSeqContFrame::visit_gco_children(DVsmSeqContFrame & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DLocalEnv::visit_gco_children(DLocalEnv & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DVirtualSchematikaMachine::visit_gco_children(DVirtualSchematikaMachine & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue