xo-reader2: + SyntaxStateMachine.forward_children method
Support gc traversal with goal of making ParserStateMachine a gc root
This commit is contained in:
parent
b0b14d4e41
commit
263999efdb
92 changed files with 633 additions and 43 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "Metatype.hpp"
|
||||
#include "TypeVarRef.hpp"
|
||||
#include <xo/reflect/Reflect.hpp>
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/facet/FacetRegistry.hpp>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -89,10 +90,12 @@ namespace xo {
|
|||
std::size_t
|
||||
DTypeVarRef::forward_children(obj<ACollector> gc) noexcept
|
||||
{
|
||||
{
|
||||
auto e = FacetRegistry::instance().variant<AGCObject,AType>(type_);
|
||||
gc.forward_inplace(e.iface(), (void **)&type_.data_);
|
||||
}
|
||||
gc.forward_pivot_inplace(&type_);
|
||||
|
||||
//{
|
||||
// auto e = FacetRegistry::instance().variant<AGCObject,AType>(type_);
|
||||
// gc.forward_inplace(e.iface(), (void **)&type_.data_);
|
||||
//}
|
||||
|
||||
return this->shallow_size();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue