refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
parent
57688a826a
commit
801bb9e39d
266 changed files with 952 additions and 947 deletions
|
|
@ -907,7 +907,7 @@ namespace xo {
|
|||
#endif
|
||||
|
||||
void
|
||||
ParserStateMachine::forward_children(obj<ACollector> gc) noexcept
|
||||
ParserStateMachine::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
//scope log(XO_DEBUG(true));
|
||||
|
||||
|
|
@ -916,23 +916,23 @@ namespace xo {
|
|||
|
||||
//log && log("forward stack_", xtag("addr", stack_));
|
||||
if (stack_) {
|
||||
stack_->forward_children(gc);
|
||||
stack_->visit_gco_children(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.forward_inplace(&global_symtab_);
|
||||
gc.visit_child(&global_symtab_);
|
||||
|
||||
//log && log("local_symtab_", xtag("addr", local_symtab_.data()));
|
||||
gc.forward_inplace(&local_symtab_);
|
||||
gc.visit_child(&local_symtab_);
|
||||
|
||||
//log && log("global_env_", xtag("addr", global_env_.data()));
|
||||
gc.forward_inplace(&global_env_);
|
||||
gc.visit_child(&global_env_);
|
||||
|
||||
//log && log("result_");
|
||||
result_.forward_children(gc);
|
||||
result_.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue