refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
This commit is contained in:
parent
bf8c3628ff
commit
d740c94406
105 changed files with 260 additions and 416 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