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
|
|
@ -74,6 +74,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DDefineSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -200,7 +201,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DExpectExprSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -194,7 +195,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectFormalArglistSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -130,7 +131,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQArraySsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -123,7 +124,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQListSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -124,7 +125,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQLiteralSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -129,7 +130,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectSymbolSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -80,7 +81,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DExpectTypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -87,7 +88,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ namespace xo {
|
|||
class DGlobalEnv {
|
||||
public:
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -73,7 +73,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
DGlobalEnv * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-globalenv-printable-facet **/
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DProgressSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -217,7 +218,8 @@ namespace xo {
|
|||
/** @defgroup scm-progressssm-gc-support gc support methods **/
|
||||
///@{
|
||||
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DQuoteSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -150,7 +151,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DSequenceSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -97,7 +98,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DToplevelSeqSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -161,7 +162,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ namespace xo {
|
|||
class ParserResult {
|
||||
public:
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -69,7 +70,7 @@ namespace xo {
|
|||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
/** gc support: forward gc-eligible children **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
public:
|
||||
/** none|expression|error_description
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ namespace xo {
|
|||
public:
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -56,7 +57,8 @@ namespace xo {
|
|||
/** pretty-printer support **/
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
private:
|
||||
/** stack pointer: top of stack just before this instance created **/
|
||||
|
|
|
|||
|
|
@ -40,10 +40,11 @@ namespace xo {
|
|||
public:
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ArenaConfig = xo::mm::ArenaConfig;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using DArena = xo::mm::DArena;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using ArenaHashMapConfig = xo::map::ArenaHashMapConfig;
|
||||
|
|
@ -354,7 +355,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** update gc-aware exit pointers from this ParserStateMachine **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,14 @@ namespace xo {
|
|||
struct ReaderResult {
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using span_type = xo::mm::span<const char>;
|
||||
|
||||
bool is_tk_error() const { return tk_error_.is_error(); }
|
||||
|
||||
/** forward gc-aware pointers (called during gc cycle) **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
/** schematika expression parsed from input **/
|
||||
obj<AExpression> expr_;
|
||||
|
|
@ -43,6 +45,7 @@ namespace xo {
|
|||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using span_type = xo::mm::span<const char>;
|
||||
|
|
@ -110,7 +113,8 @@ namespace xo {
|
|||
void reset_to_idle_toplevel();
|
||||
|
||||
/** update gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
private:
|
||||
/** tokenizer converts a stream of chars
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include "DSyntaxStateMachine.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
#include <xo/expression2/ApplyExpr.hpp>
|
||||
//#include <xo/facet/obj.hpp>
|
||||
#include <string_view>
|
||||
|
||||
|
||||
|
|
@ -66,12 +65,11 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DApplySsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
//using Apply = xo::scm::Apply;
|
||||
|
||||
public:
|
||||
/** @defgroup scm-applyssm-ctors constructors **/
|
||||
///@{
|
||||
|
|
@ -190,7 +188,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DApplySsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DApplySsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DApplySsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DDefineSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DDefineSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DDefineSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DDeftypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -172,7 +173,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DDeftypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DDeftypeSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DDeftypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ namespace xo {
|
|||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::AGCObject::VisitReason;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/
|
|||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DGlobalEnv & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
static void visit_gco_children(DGlobalEnv & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DExpectFormalArgSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -126,7 +127,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectFormalArgSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectFormalArgSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectFormalArgSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DExpectListTypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -135,7 +136,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectListTypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectListTypeSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectListTypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQDictSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -159,7 +160,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQDictSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectQDictSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectQDictSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DIfElseSsm>;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -171,7 +172,8 @@ namespace xo {
|
|||
/** @defgroup scm-ifelsessm-gc-support gc support methods **/
|
||||
///@{
|
||||
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DIfElseSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DIfElseSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DIfElseSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DLambdaSsm>;
|
||||
using DLocalSymtab = xo::scm::DLocalSymtab;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -189,7 +190,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DLambdaSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DLambdaSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DLambdaSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace xo {
|
|||
using Super = DSyntaxStateMachine<DParenSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -136,7 +137,8 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit immediate gc-aware children **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason,
|
||||
obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DParenSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DParenSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DParenSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -164,9 +164,9 @@ namespace xo {
|
|||
using token_type = Token;
|
||||
using ArenaHashMapConfig = xo::map::ArenaHashMapConfig;
|
||||
using ArenaConfig = xo::mm::ArenaConfig;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -297,7 +297,7 @@ namespace xo {
|
|||
/** not implemented (SchematikaParser not designed to be copyable) **/
|
||||
DSchematikaParser * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
|
||||
/** forward gc-aware children **/
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ namespace xo {
|
|||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using VisitReason = xo::mm::AGCObject::VisitReason;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -59,7 +60,7 @@ Arguably abusing the word 'visitor' here **/
|
|||
/** Invoke fn.visit_child(iface,data) for each child GCObject pointer.
|
||||
Context: provides address of data pointer so it can be updated in place
|
||||
when @p fn invokes garbage collector reentry point **/
|
||||
static void visit_gco_children(DSchematikaParser & self, obj<AGCObjectVisitor> fn) noexcept;
|
||||
static void visit_gco_children(DSchematikaParser & self, VisitReason reason, obj<AGCObjectVisitor> fn) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DQuoteSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DQuoteSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DQuoteSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public:
|
|||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
/** gc-aware object **/
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
/** hint when traversing gco graph **/
|
||||
using VisitReason = xo::mm::VisitReason;
|
||||
///@}
|
||||
|
||||
/** @defgroup scm-syntaxstatemachine-methods **/
|
||||
|
|
@ -91,7 +93,7 @@ public:
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
virtual void on_quoted_literal(Opaque data, obj<AGCObject> lit, ParserStateMachine * p_psm) = 0;
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
virtual void visit_gco_children(Opaque data, obj<AGCObjectVisitor> gc) = 0;
|
||||
virtual void visit_gco_children(Opaque data, VisitReason reason, obj<AGCObjectVisitor> gc) = 0;
|
||||
///@}
|
||||
}; /*ASyntaxStateMachine*/
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ namespace scm {
|
|||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = ASyntaxStateMachine::VisitReason;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-syntaxstatemachine-any-methods **/
|
||||
|
|
@ -75,7 +76,7 @@ namespace scm {
|
|||
[[noreturn]] void on_parsed_expression(Opaque, obj<AExpression>, ParserStateMachine *) override;
|
||||
[[noreturn]] void on_parsed_expression_with_token(Opaque, obj<AExpression>, const Token &, ParserStateMachine *) override;
|
||||
[[noreturn]] void on_quoted_literal(Opaque, obj<AGCObject>, ParserStateMachine *) override;
|
||||
[[noreturn]] void visit_gco_children(Opaque, obj<AGCObjectVisitor>) override;
|
||||
[[noreturn]] void visit_gco_children(Opaque, VisitReason, obj<AGCObjectVisitor>) override;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectExprSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectExprSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectExprSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectFormalArglistSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectFormalArglistSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectFormalArglistSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQArraySsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectQArraySsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectQArraySsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQListSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectQListSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectQListSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQLiteralSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectQLiteralSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectQLiteralSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectSymbolSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectSymbolSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectSymbolSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectTypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DExpectTypeSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DExpectTypeSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DProgressSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DProgressSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DProgressSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DSequenceSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DSequenceSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DSequenceSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
|
|
@ -77,7 +78,7 @@ namespace xo {
|
|||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DToplevelSeqSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
||||
static void visit_gco_children(DToplevelSeqSsm & self, obj<AGCObjectVisitor> gc);
|
||||
static void visit_gco_children(DToplevelSeqSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ namespace scm {
|
|||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = ASyntaxStateMachine::VisitReason;
|
||||
///@}
|
||||
|
||||
/** @defgroup scm-syntaxstatemachine-xfer-methods **/
|
||||
|
|
@ -89,8 +90,8 @@ namespace scm {
|
|||
void on_quoted_literal(Opaque data, obj<AGCObject> lit, ParserStateMachine * p_psm) override {
|
||||
return I::on_quoted_literal(_dcast(data), lit, p_psm);
|
||||
}
|
||||
void visit_gco_children(Opaque data, obj<AGCObjectVisitor> gc) override {
|
||||
return I::visit_gco_children(_dcast(data), gc);
|
||||
void visit_gco_children(Opaque data, VisitReason reason, obj<AGCObjectVisitor> gc) override {
|
||||
return I::visit_gco_children(_dcast(data), reason, gc);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public:
|
|||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
using VisitReason = ASyntaxStateMachine::VisitReason;
|
||||
///@}
|
||||
|
||||
/** @defgroup scm-syntaxstatemachine-router-ctors **/
|
||||
|
|
@ -93,8 +94,8 @@ public:
|
|||
void on_quoted_literal(obj<AGCObject> lit, ParserStateMachine * p_psm) {
|
||||
return O::iface()->on_quoted_literal(O::data(), lit, p_psm);
|
||||
}
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) {
|
||||
return O::iface()->visit_gco_children(O::data(), gc);
|
||||
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) {
|
||||
return O::iface()->visit_gco_children(O::data(), reason, gc);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue