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
31df51ac8e
commit
d14f119a37
102 changed files with 258 additions and 167 deletions
|
|
@ -397,10 +397,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DApplySsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DApplySsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&fn_expr_);
|
||||
gc.visit_child(&args_expr_v_);
|
||||
gc.visit_poly_child(reason, &fn_expr_);
|
||||
gc.visit_child(reason, &args_expr_v_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -692,9 +692,10 @@ namespace xo {
|
|||
// ----- gc support -----
|
||||
|
||||
void
|
||||
DDefineSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DDefineSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&def_expr_.data_);
|
||||
gc.visit_child(reason, &def_expr_.data_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ namespace xo {
|
|||
refrtag("expect", this->get_expect_str()));
|
||||
}
|
||||
void
|
||||
DDeftypeSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DDeftypeSsm::visit_gco_children(VisitReason, obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
static_assert(!DUniqueString::is_gc_eligible());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,8 @@ namespace xo {
|
|||
#endif
|
||||
|
||||
void
|
||||
DExpectExprSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DExpectExprSsm::visit_gco_children(VisitReason,
|
||||
obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// all members POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,8 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectFormalArgSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DExpectFormalArgSsm::visit_gco_children(VisitReason,
|
||||
obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
static_assert(!DUniqueString::is_gc_eligible());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -358,9 +358,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DExpectFormalArglistSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&argl_);
|
||||
gc.visit_child(reason, &argl_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -204,9 +204,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectListTypeSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DExpectListTypeSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&elt_type_);
|
||||
gc.visit_poly_child(reason, &elt_type_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -220,9 +220,10 @@ namespace xo {
|
|||
refrtag("array", array_pr));
|
||||
}
|
||||
void
|
||||
DExpectQArraySsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DExpectQArraySsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&array_);
|
||||
gc.visit_child(reason, &array_);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -267,10 +267,11 @@ namespace xo {
|
|||
|
||||
|
||||
void
|
||||
DExpectQDictSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DExpectQDictSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&key_);
|
||||
gc.visit_child(&dict_);
|
||||
gc.visit_child(reason, &key_);
|
||||
gc.visit_child(reason, &dict_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -215,10 +215,11 @@ namespace xo {
|
|||
refrtag("list", list_pr));
|
||||
}
|
||||
void
|
||||
DExpectQListSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DExpectQListSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&start_);
|
||||
gc.visit_child(&end_);
|
||||
gc.visit_child(reason, &start_);
|
||||
gc.visit_child(reason, &end_);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ namespace xo {
|
|||
refrtag("expect", this->get_expect_str()));
|
||||
}
|
||||
void
|
||||
DExpectQLiteralSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DExpectQLiteralSsm::visit_gco_children(VisitReason, obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// cxl_on_rightparen_, cxl_on_rightbracket_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ namespace xo {
|
|||
);
|
||||
}
|
||||
void
|
||||
DExpectSymbolSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DExpectSymbolSsm::visit_gco_children(VisitReason,
|
||||
obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// no gc-aware members
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,8 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectTypeSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DExpectTypeSsm::visit_gco_children(VisitReason,
|
||||
obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// corrected_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,10 +114,11 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DGlobalEnv::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DGlobalEnv::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&symtab_);
|
||||
gc.visit_child(&values_);
|
||||
gc.visit_child(reason, &symtab_);
|
||||
gc.visit_child(reason, &values_);
|
||||
}
|
||||
|
||||
// ----- APrintable facet -----
|
||||
|
|
|
|||
|
|
@ -510,9 +510,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DIfElseSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DIfElseSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&if_expr_);
|
||||
gc.visit_poly_child(reason, &if_expr_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -471,15 +471,16 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DLambdaSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DLambdaSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&local_symtab_);
|
||||
gc.visit_child(reason, &local_symtab_);
|
||||
|
||||
// explicit_return_td not gcobject
|
||||
// lambda_td not gcobject
|
||||
|
||||
gc.visit_poly_child(&body_);
|
||||
gc.visit_poly_child(&parent_symtab_);
|
||||
gc.visit_poly_child(reason, &body_);
|
||||
gc.visit_poly_child(reason, &parent_symtab_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -459,9 +459,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DParenSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DParenSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&expr_);
|
||||
gc.visit_poly_child(reason, &expr_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -1244,10 +1244,11 @@ case optype::op_assign:
|
|||
}
|
||||
|
||||
void
|
||||
DProgressSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DProgressSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&lhs_);
|
||||
gc.visit_poly_child(&rhs_);
|
||||
gc.visit_poly_child(reason, &lhs_);
|
||||
gc.visit_poly_child(reason, &rhs_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -212,9 +212,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DQuoteSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DQuoteSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&expr_);
|
||||
gc.visit_poly_child(reason, &expr_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -197,9 +197,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DSchematikaParser::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DSchematikaParser::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
psm_.visit_gco_children(gc);
|
||||
psm_.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -258,9 +258,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DSequenceSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
DSequenceSsm::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_child(&seq_expr_);
|
||||
gc.visit_child(reason, &seq_expr_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ namespace xo {
|
|||
refrtag("seqtype", seqtype_));
|
||||
}
|
||||
void
|
||||
DToplevelSeqSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
DToplevelSeqSsm::visit_gco_children(VisitReason, obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// seqtype_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ ISyntaxStateMachine_Any::on_quoted_literal(Opaque, obj<AGCObject>, ParserStateMa
|
|||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_Any::visit_gco_children(Opaque, obj<AGCObjectVisitor>) -> void
|
||||
ISyntaxStateMachine_Any::visit_gco_children(Opaque, VisitReason, obj<AGCObjectVisitor>) -> void
|
||||
{
|
||||
_fatal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectExprSsm::visit_gco_children(DExpectExprSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectExprSsm::visit_gco_children(DExpectExprSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::visit_gco_children(DExpectFormalArglistSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::visit_gco_children(DExpectFormalArglistSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQArraySsm::visit_gco_children(DExpectQArraySsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQArraySsm::visit_gco_children(DExpectQArraySsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQListSsm::visit_gco_children(DExpectQListSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQListSsm::visit_gco_children(DExpectQListSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQLiteralSsm::visit_gco_children(DExpectQLiteralSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQLiteralSsm::visit_gco_children(DExpectQLiteralSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectSymbolSsm::visit_gco_children(DExpectSymbolSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectSymbolSsm::visit_gco_children(DExpectSymbolSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectTypeSsm::visit_gco_children(DExpectTypeSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectTypeSsm::visit_gco_children(DExpectTypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DParenSsm::visit_gco_children(DParenSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DParenSsm::visit_gco_children(DParenSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DProgressSsm::visit_gco_children(DProgressSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DProgressSsm::visit_gco_children(DProgressSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::visit_gco_children(DSequenceSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DSequenceSsm::visit_gco_children(DSequenceSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DToplevelSeqSsm::visit_gco_children(DToplevelSeqSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DToplevelSeqSsm::visit_gco_children(DToplevelSeqSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -106,12 +106,13 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
ParserResult::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
ParserResult::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
// {result_type_, error_src_fn_}: pod, ignore
|
||||
|
||||
gc.visit_poly_child(&result_expr_);
|
||||
gc.visit_child(&error_description_);
|
||||
gc.visit_poly_child(reason, &result_expr_);
|
||||
gc.visit_child(reason, &error_description_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -90,14 +90,15 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
ParserStack::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
ParserStack::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
|
||||
for (ParserStack * target = this; target; target = target->parent_) {
|
||||
// ParserStack::ckp: skip, POD
|
||||
|
||||
if (target->ssm_)
|
||||
target->ssm_.visit_gco_children(gc);
|
||||
target->ssm_.visit_gco_children(reason, gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -907,7 +907,8 @@ namespace xo {
|
|||
#endif
|
||||
|
||||
void
|
||||
ParserStateMachine::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
ParserStateMachine::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
//scope log(XO_DEBUG(true));
|
||||
|
||||
|
|
@ -916,23 +917,23 @@ namespace xo {
|
|||
|
||||
//log && log("forward stack_", xtag("addr", stack_));
|
||||
if (stack_) {
|
||||
stack_->visit_gco_children(gc);
|
||||
stack_->visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
// static_assert(!expr_alloc_.is_gc_eligible());
|
||||
// static_assert(!aux_alloc_.is_gc_eligible());
|
||||
|
||||
//log && log("global_symtab_", xtag("addr", global_symtab_.data()));
|
||||
gc.visit_child(&global_symtab_);
|
||||
gc.visit_child(reason, &global_symtab_);
|
||||
|
||||
//log && log("local_symtab_", xtag("addr", local_symtab_.data()));
|
||||
gc.visit_child(&local_symtab_);
|
||||
gc.visit_child(reason, &local_symtab_);
|
||||
|
||||
//log && log("global_env_", xtag("addr", global_env_.data()));
|
||||
gc.visit_child(&global_env_);
|
||||
gc.visit_child(reason, &global_env_);
|
||||
|
||||
//log && log("result_");
|
||||
result_.visit_gco_children(gc);
|
||||
result_.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ namespace xo {
|
|||
|
||||
namespace scm {
|
||||
void
|
||||
ReaderResult::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
ReaderResult::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.visit_poly_child(&expr_);
|
||||
gc.visit_poly_child(reason, &expr_);
|
||||
}
|
||||
|
||||
// ----- SchematikaReader -----
|
||||
|
|
@ -208,12 +209,13 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
SchematikaReader::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
SchematikaReader::visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
// tokenizer doesn't contain any gc-aware pointers.
|
||||
|
||||
parser_.visit_gco_children(gc);
|
||||
result_.visit_gco_children(gc);
|
||||
parser_.visit_gco_children(reason, gc);
|
||||
result_.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.gco_shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DGlobalEnv::visit_gco_children(DGlobalEnv & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DGlobalEnv::visit_gco_children(DGlobalEnv & 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_DSchematikaParser::visit_gco_children(DSchematikaParser & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
IGCObject_DSchematikaParser::visit_gco_children(DSchematikaParser & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.visit_gco_children(fn);
|
||||
self.visit_gco_children(reason, fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DApplySsm::visit_gco_children(DApplySsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DApplySsm::visit_gco_children(DApplySsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DDefineSsm::visit_gco_children(DDefineSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DDefineSsm::visit_gco_children(DDefineSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DDeftypeSsm::visit_gco_children(DDeftypeSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DDeftypeSsm::visit_gco_children(DDeftypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArgSsm::visit_gco_children(DExpectFormalArgSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectFormalArgSsm::visit_gco_children(DExpectFormalArgSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectListTypeSsm::visit_gco_children(DExpectListTypeSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectListTypeSsm::visit_gco_children(DExpectListTypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::visit_gco_children(DExpectQDictSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQDictSsm::visit_gco_children(DExpectQDictSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DIfElseSsm::visit_gco_children(DIfElseSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DIfElseSsm::visit_gco_children(DIfElseSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DLambdaSsm::visit_gco_children(DLambdaSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DLambdaSsm::visit_gco_children(DLambdaSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DQuoteSsm::visit_gco_children(DQuoteSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
ISyntaxStateMachine_DQuoteSsm::visit_gco_children(DQuoteSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.visit_gco_children(gc);
|
||||
self.visit_gco_children(reason, gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue