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
|
|
@ -10,7 +10,7 @@
|
|||
"<xo/type/Type.hpp>",
|
||||
"<xo/tokenizer2/Token.hpp>",
|
||||
"<xo/reflect/TypeDescr.hpp>",
|
||||
"<xo/alloc2/Collector.hpp>"
|
||||
"<xo/alloc2/GCObjectVisitor.hpp>"
|
||||
],
|
||||
// extra includes in SyntaxStateMachine.hpp, if any
|
||||
user_hpp_includes: [],
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
],
|
||||
types: [
|
||||
{ name: "TypeDescr", doc: [ "reflected c++ type" ], definition: "xo::reflect::TypeDescr" },
|
||||
{ name: "ACollector", doc: [ "gc interface" ], definition: "xo::mm::ACollector" },
|
||||
{ name: "AGCObjectVisitor", doc: [ "gc visitor interface" ], definition: "xo::mm::AGCObjectVisitor" },
|
||||
{ name: "AGCObject", doc: [ "gc-aware object" ], definition: "xo::mm::AGCObject" },
|
||||
// { name: string, doc: [ string ], definition: string },
|
||||
],
|
||||
|
|
@ -147,11 +147,11 @@
|
|||
],
|
||||
},
|
||||
{
|
||||
name: "forward_children",
|
||||
doc: ["gc support: move immediate children to to-space and sub forwarding pointer"],
|
||||
name: "visit_gco_children",
|
||||
doc: ["gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each"],
|
||||
return_type: "void",
|
||||
args: [
|
||||
{type: "obj<ACollector>", name: "gc"},
|
||||
{type: "obj<AGCObjectVisitor>", name: "gc"},
|
||||
],
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DDefineSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -200,7 +200,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc);
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "DSyntaxStateMachine.hpp"
|
||||
//#include "ParserStateMachine.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/indentlog/print/ppindentinfo.hpp>
|
||||
|
|
@ -18,7 +17,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectExprSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -195,7 +194,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
class DExpectFormalArglistSsm : public DSyntaxStateMachine<DExpectFormalArglistSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectFormalArglistSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -130,7 +130,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "DSyntaxStateMachine.hpp"
|
||||
#include <xo/object2/ListOps.hpp>
|
||||
//#include <xo/arena/DArena.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -58,7 +57,7 @@ namespace xo {
|
|||
class DExpectQArraySsm : public DSyntaxStateMachine<DExpectQArraySsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQArraySsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -124,7 +123,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace xo {
|
|||
class DExpectQListSsm : public DSyntaxStateMachine<DExpectQListSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQListSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -124,7 +124,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace xo {
|
|||
class DExpectQLiteralSsm : public DSyntaxStateMachine<DExpectQLiteralSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQLiteralSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -129,7 +129,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace xo {
|
|||
class DExpectSymbolSsm : public DSyntaxStateMachine<DExpectSymbolSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectSymbolSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -80,7 +80,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectTypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <xo/expression2/DGlobalSymtab.hpp>
|
||||
#include <xo/object2/DArray.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -27,8 +28,9 @@ namespace xo {
|
|||
public:
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using size_type = std::uint32_t;
|
||||
|
|
@ -70,9 +72,8 @@ namespace xo {
|
|||
/** @defgroup scm-globalenv-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DGlobalEnv * shallow_move(obj<ACollector> gc) noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-globalenv-printable-facet **/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "DSyntaxStateMachine.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
//#include <xo/expression2/Expression.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
|
||||
#ifdef NOT_YET
|
||||
|
|
@ -90,7 +89,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DProgressSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -218,7 +217,7 @@ namespace xo {
|
|||
/** @defgroup scm-progressssm-gc-support gc support methods **/
|
||||
///@{
|
||||
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DQuoteSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -150,7 +150,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace xo {
|
|||
class DSequenceSsm : public DSyntaxStateMachine<DSequenceSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DSequenceSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -97,7 +97,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DToplevelSeqSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -161,7 +161,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace xo {
|
|||
|
||||
class ParserResult {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
|
|
@ -69,7 +69,7 @@ namespace xo {
|
|||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
/** gc support: forward gc-eligible children **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
public:
|
||||
/** none|expression|error_description
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/arena/DArena.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/indentlog/print/pretty.hpp>
|
||||
|
|
@ -21,7 +22,8 @@ namespace xo {
|
|||
**/
|
||||
class ParserStack {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
//using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -54,7 +56,7 @@ namespace xo {
|
|||
/** pretty-printer support **/
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
private:
|
||||
/** stack pointer: top of stack just before this instance created **/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <xo/object2/DArray.hpp>
|
||||
#include <xo/stringtable2/StringTable.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/arena/ArenaHashMapConfig.hpp>
|
||||
#include <xo/arena/DArena.hpp>
|
||||
|
||||
|
|
@ -39,6 +40,7 @@ namespace xo {
|
|||
public:
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ArenaConfig = xo::mm::ArenaConfig;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
|
|
@ -352,7 +354,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** update gc-aware exit pointers from this ParserStateMachine **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "DQuoteSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DQuoteSsm.hpp"
|
||||
#include "ssm/IPrintable_DQuoteSsm.hpp"
|
||||
#include "quote/ISyntaxStateMachine_DQuoteSsm.hpp"
|
||||
#include "quote/IPrintable_DQuoteSsm.hpp"
|
||||
|
||||
/* end QuoteSsm.hpp */
|
||||
|
|
|
|||
|
|
@ -8,17 +8,19 @@
|
|||
#include "ReaderConfig.hpp"
|
||||
#include "SchematikaParser.hpp"
|
||||
#include <xo/tokenizer2/Tokenizer.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
struct ReaderResult {
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
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 forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
/** schematika expression parsed from input **/
|
||||
obj<AExpression> expr_;
|
||||
|
|
@ -40,6 +42,7 @@ namespace xo {
|
|||
class SchematikaReader {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using span_type = xo::mm::span<const char>;
|
||||
|
|
@ -107,7 +110,7 @@ namespace xo {
|
|||
void reset_to_idle_toplevel();
|
||||
|
||||
/** update gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
private:
|
||||
/** tokenizer converts a stream of chars
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DApplySsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -190,7 +190,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dapplyssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DApplySsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DApplySsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DApplySsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-ddefinessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DDefineSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DDefineSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DDefineSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DDeftypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -172,7 +172,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-ddeftypessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DDeftypeSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DDeftypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DDeftypeSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DGlobalEnv & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DGlobalEnv & self, obj<ACollector> gc) noexcept;
|
||||
/** 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;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectFormalArgSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectformalargssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectFormalArgSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectFormalArgSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectFormalArgSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectListTypeSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectlisttypessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectListTypeSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectListTypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectListTypeSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace xo {
|
|||
class DExpectQDictSsm : public DSyntaxStateMachine<DExpectQDictSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectQDictSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectqdictssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectQDictSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQDictSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectQDictSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace xo {
|
|||
class DIfElseSsm : public DSyntaxStateMachine<DIfElseSsm> {
|
||||
public:
|
||||
using Super = DSyntaxStateMachine<DIfElseSsm>;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -171,7 +171,7 @@ namespace xo {
|
|||
/** @defgroup scm-ifelsessm-gc-support gc support methods **/
|
||||
///@{
|
||||
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-difelsessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DIfElseSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DIfElseSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DIfElseSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DLambdaSsm>;
|
||||
using DLocalSymtab = xo::scm::DLocalSymtab;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
|
@ -189,7 +189,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dlambdassm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DLambdaSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DLambdaSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DLambdaSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DParenSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -136,7 +136,7 @@ namespace xo {
|
|||
///@{
|
||||
|
||||
/** gc support: visit immediate gc-aware children **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dparenssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DParenSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DParenSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DParenSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "ParserResult.hpp"
|
||||
#include <xo/tokenizer2/Token.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -164,8 +165,9 @@ namespace xo {
|
|||
using ArenaHashMapConfig = xo::map::ArenaHashMapConfig;
|
||||
using ArenaConfig = xo::mm::ArenaConfig;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using size_type = std::size_t;
|
||||
|
|
@ -292,11 +294,10 @@ namespace xo {
|
|||
/** @defgroup scm-schematikaparser-gcobject-methods **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
/** not implemented (SchematikaParser not designed to be copyable) **/
|
||||
DSchematikaParser * shallow_move(obj<ACollector> gc) noexcept;
|
||||
/** forward gc-aware children **/
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) noexcept;
|
||||
|
||||
///@}
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace xo {
|
|||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using AGCObjectVisitor = xo::mm::AGCObject::AGCObjectVisitor;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
|
|
@ -54,8 +55,10 @@ namespace xo {
|
|||
// non-const methods
|
||||
/** move instance using allocator **/
|
||||
static Opaque shallow_move(DSchematikaParser & self, obj<ACollector> gc) noexcept;
|
||||
/** during GC: forward immdiate children **/
|
||||
static void forward_children(DSchematikaParser & self, obj<ACollector> gc) noexcept;
|
||||
/** 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;
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dquotessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DQuoteSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DQuoteSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DQuoteSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <xo/type/Type.hpp>
|
||||
#include <xo/tokenizer2/Token.hpp>
|
||||
#include <xo/reflect/TypeDescr.hpp>
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/facet/facet_implementation.hpp>
|
||||
#include <xo/facet/typeseq.hpp>
|
||||
|
|
@ -46,8 +46,8 @@ public:
|
|||
using Opaque = void *;
|
||||
/** reflected c++ type **/
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
/** gc interface **/
|
||||
using ACollector = xo::mm::ACollector;
|
||||
/** gc visitor interface **/
|
||||
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
|
||||
/** gc-aware object **/
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
///@}
|
||||
|
|
@ -90,8 +90,8 @@ public:
|
|||
virtual void on_parsed_expression_with_token(Opaque data, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm) = 0;
|
||||
/** 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: move immediate children to to-space and sub forwarding pointer **/
|
||||
virtual void forward_children(Opaque data, obj<ACollector> gc) = 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;
|
||||
///@}
|
||||
}; /*ASyntaxStateMachine*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
/** @file IPrintable_DQuoteSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DQuoteSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DQuoteSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Printable.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
|
||||
#include "DQuoteSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IPrintable_DQuoteSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::print::APrintable,
|
||||
xo::scm::DQuoteSsm>
|
||||
{
|
||||
using ImplType = xo::print::IPrintable_Xfer
|
||||
<xo::scm::DQuoteSsm,
|
||||
xo::scm::IPrintable_DQuoteSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IPrintable_DQuoteSsm
|
||||
**/
|
||||
class IPrintable_DQuoteSsm {
|
||||
public:
|
||||
/** @defgroup scm-printable-dquotessm-type-traits **/
|
||||
///@{
|
||||
using ppindentinfo = xo::print::APrintable::ppindentinfo;
|
||||
using Copaque = xo::print::APrintable::Copaque;
|
||||
using Opaque = xo::print::APrintable::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-printable-dquotessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DQuoteSsm & self, const ppindentinfo & ppii);
|
||||
|
||||
// non-const methods
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
|
|
@ -45,7 +45,7 @@ namespace scm {
|
|||
/** integer identifying a type **/
|
||||
using typeseq = xo::facet::typeseq;
|
||||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
|
||||
///@}
|
||||
|
|
@ -75,7 +75,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 forward_children(Opaque, obj<ACollector>) override;
|
||||
[[noreturn]] void visit_gco_children(Opaque, obj<AGCObjectVisitor>) override;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectexprssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectExprSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectExprSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectExprSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectformalarglistssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectFormalArglistSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectFormalArglistSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectFormalArglistSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectqarrayssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectQArraySsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQArraySsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectQArraySsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectqlistssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectQListSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQListSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectQListSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectqliteralssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectQLiteralSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectQLiteralSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectQLiteralSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectsymbolssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectSymbolSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectSymbolSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectSymbolSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpecttypessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectTypeSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectTypeSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectTypeSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dprogressssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DProgressSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DProgressSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DProgressSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,87 +0,0 @@
|
|||
/** @file ISyntaxStateMachine_DQuoteSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DQuoteSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DQuoteSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_Xfer.hpp"
|
||||
#include "DQuoteSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class ISyntaxStateMachine_DQuoteSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::scm::ASyntaxStateMachine,
|
||||
xo::scm::DQuoteSsm>
|
||||
{
|
||||
using ImplType = xo::scm::ISyntaxStateMachine_Xfer
|
||||
<xo::scm::DQuoteSsm,
|
||||
xo::scm::ISyntaxStateMachine_DQuoteSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class ISyntaxStateMachine_DQuoteSsm
|
||||
**/
|
||||
class ISyntaxStateMachine_DQuoteSsm {
|
||||
public:
|
||||
/** @defgroup scm-syntaxstatemachine-dquotessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-syntaxstatemachine-dquotessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** identify a type of syntax state machine **/
|
||||
static syntaxstatetype ssm_type(const DQuoteSsm & self) noexcept;
|
||||
/** text describing expected/allowed input to this ssm in current state **/
|
||||
static std::string_view get_expect_str(const DQuoteSsm & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** operate state machine for incoming token @p tk **/
|
||||
static void on_token(DQuoteSsm & self, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update stat machine for incoming parsed symbol @p sym **/
|
||||
static void on_parsed_symbol(DQuoteSsm & self, std::string_view sym, ParserStateMachine * p_psm);
|
||||
/** operate state machine for incoming type description @p td **/
|
||||
static void on_parsed_typedescr(DQuoteSsm & self, TypeDescr td, ParserStateMachine * p_psm);
|
||||
/** update state machine for type emitted by nested ssm **/
|
||||
static void on_parsed_type(DQuoteSsm & self, obj<AType> type, ParserStateMachine * p_psm);
|
||||
/** operate state machine for formal emitted by nested ssm **/
|
||||
static void on_parsed_formal(DQuoteSsm & self, const DUniqueString * param_name, TypeDescr param_type, ParserStateMachine * p_psm);
|
||||
/** operate state machine for formal emitted by nested ssm **/
|
||||
static void on_parsed_formal_with_token(DQuoteSsm & self, const DUniqueString * param_name, TypeDescr param_type, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** consume formal arglist emitted by nested ssm **/
|
||||
static void on_parsed_formal_arglist(DQuoteSsm & self, DArray * arglist, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested parsed expression @p expr **/
|
||||
static void on_parsed_expression(DQuoteSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm);
|
||||
/** update state machine @p p_psm for incoming parsed expression @p expr followed by token @p tk **/
|
||||
static void on_parsed_expression_with_token(DQuoteSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DQuoteSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DQuoteSsm & self, obj<ACollector> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dsequencessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DSequenceSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DSequenceSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DSequenceSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dtoplevelseqssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -76,8 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DToplevelSeqSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DToplevelSeqSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DToplevelSeqSsm & self, obj<ACollector> gc);
|
||||
/** 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);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <xo/type/Type.hpp>
|
||||
#include <xo/tokenizer2/Token.hpp>
|
||||
#include <xo/reflect/TypeDescr.hpp>
|
||||
#include <xo/alloc2/Collector.hpp>
|
||||
#include <xo/alloc2/GCObjectVisitor.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -34,7 +34,7 @@ namespace scm {
|
|||
/** integer identifying a type **/
|
||||
using typeseq = ASyntaxStateMachine::typeseq;
|
||||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
///@}
|
||||
|
||||
|
|
@ -89,8 +89,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 forward_children(Opaque data, obj<ACollector> gc) override {
|
||||
return I::forward_children(_dcast(data), gc);
|
||||
void visit_gco_children(Opaque data, obj<AGCObjectVisitor> gc) override {
|
||||
return I::visit_gco_children(_dcast(data), gc);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public:
|
|||
using DataPtr = Object::DataPtr;
|
||||
using typeseq = xo::reflect::typeseq;
|
||||
using TypeDescr = ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = ASyntaxStateMachine::ACollector;
|
||||
using AGCObjectVisitor = ASyntaxStateMachine::AGCObjectVisitor;
|
||||
using AGCObject = ASyntaxStateMachine::AGCObject;
|
||||
///@}
|
||||
|
||||
|
|
@ -93,8 +93,8 @@ public:
|
|||
void on_quoted_literal(obj<AGCObject> lit, ParserStateMachine * p_psm) {
|
||||
return O::iface()->on_quoted_literal(O::data(), lit, p_psm);
|
||||
}
|
||||
void forward_children(obj<ACollector> gc) {
|
||||
return O::iface()->forward_children(O::data(), gc);
|
||||
void visit_gco_children(obj<AGCObjectVisitor> gc) {
|
||||
return O::iface()->visit_gco_children(O::data(), gc);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -397,10 +397,10 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DApplySsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DApplySsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&fn_expr_);
|
||||
gc.forward_inplace(&args_expr_v_);
|
||||
gc.visit_poly_child(&fn_expr_);
|
||||
gc.visit_child(&args_expr_v_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -692,9 +692,9 @@ namespace xo {
|
|||
// ----- gc support -----
|
||||
|
||||
void
|
||||
DDefineSsm::forward_children(obj<ACollector> gc)
|
||||
DDefineSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&def_expr_.data_);
|
||||
gc.visit_child(&def_expr_.data_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ namespace xo {
|
|||
refrtag("expect", this->get_expect_str()));
|
||||
}
|
||||
void
|
||||
DDeftypeSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DDeftypeSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
static_assert(!DUniqueString::is_gc_eligible());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ namespace xo {
|
|||
#endif
|
||||
|
||||
void
|
||||
DExpectExprSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DExpectExprSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// all members POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectFormalArgSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DExpectFormalArgSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
static_assert(!DUniqueString::is_gc_eligible());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -358,9 +358,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DExpectFormalArglistSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&argl_);
|
||||
gc.visit_child(&argl_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -204,9 +204,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectListTypeSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DExpectListTypeSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&elt_type_);
|
||||
gc.visit_poly_child(&elt_type_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -220,9 +220,9 @@ namespace xo {
|
|||
refrtag("array", array_pr));
|
||||
}
|
||||
void
|
||||
DExpectQArraySsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DExpectQArraySsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&array_);
|
||||
gc.visit_child(&array_);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -267,10 +267,10 @@ namespace xo {
|
|||
|
||||
|
||||
void
|
||||
DExpectQDictSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DExpectQDictSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(const_cast<DString **>(&key_));
|
||||
gc.forward_inplace(&dict_);
|
||||
gc.visit_child(&key_);
|
||||
gc.visit_child(&dict_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -215,10 +215,10 @@ namespace xo {
|
|||
refrtag("list", list_pr));
|
||||
}
|
||||
void
|
||||
DExpectQListSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DExpectQListSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&start_);
|
||||
gc.forward_inplace(&end_);
|
||||
gc.visit_child(&start_);
|
||||
gc.visit_child(&end_);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ namespace xo {
|
|||
refrtag("expect", this->get_expect_str()));
|
||||
}
|
||||
void
|
||||
DExpectQLiteralSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DExpectQLiteralSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// cxl_on_rightparen_, cxl_on_rightbracket_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ namespace xo {
|
|||
);
|
||||
}
|
||||
void
|
||||
DExpectSymbolSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DExpectSymbolSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// no gc-aware members
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DExpectTypeSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DExpectTypeSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// corrected_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,25 +107,17 @@ namespace xo {
|
|||
|
||||
// ----- AGCObject facet -----
|
||||
|
||||
std::size_t
|
||||
DGlobalEnv::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
DGlobalEnv *
|
||||
DGlobalEnv::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
return gc.std_move_for<DGlobalEnv>(this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DGlobalEnv::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DGlobalEnv::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&symtab_);
|
||||
gc.forward_inplace(&values_);
|
||||
|
||||
return this->shallow_size();
|
||||
gc.visit_child(&symtab_);
|
||||
gc.visit_child(&values_);
|
||||
}
|
||||
|
||||
// ----- APrintable facet -----
|
||||
|
|
|
|||
|
|
@ -510,9 +510,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DIfElseSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DIfElseSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&if_expr_);
|
||||
gc.visit_poly_child(&if_expr_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -4,16 +4,13 @@
|
|||
**/
|
||||
|
||||
#include "LambdaSsm.hpp"
|
||||
//#include "ssm/ISyntaxStateMachine_DLambdaSsm.hpp"
|
||||
#include "ExpectFormalArglistSsm.hpp"
|
||||
//#include "ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp"
|
||||
#include "DExpectTypeSsm.hpp"
|
||||
#include "DExpectExprSsm.hpp"
|
||||
#include "ParserStateMachine.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
#include <xo/expression2/detail/IExpression_DLambdaExpr.hpp>
|
||||
#include <xo/expression2/Variable.hpp>
|
||||
//#include <xo/expression2/detail/IExpression_DVariable.hpp>
|
||||
//#include <xo/expression2/symtab/ISymbolTable_DLocalSymtab.hpp>
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/alloc2/GCObject.hpp>
|
||||
|
|
@ -474,15 +471,15 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DLambdaSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DLambdaSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&local_symtab_);
|
||||
gc.visit_child(&local_symtab_);
|
||||
|
||||
// explicit_return_td not gcobject
|
||||
// lambda_td not gcobject
|
||||
|
||||
gc.forward_pivot_inplace(&body_);
|
||||
gc.forward_pivot_inplace(&parent_symtab_);
|
||||
gc.visit_poly_child(&body_);
|
||||
gc.visit_poly_child(&parent_symtab_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -459,9 +459,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DParenSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DParenSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&expr_);
|
||||
gc.visit_poly_child(&expr_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -1244,10 +1244,10 @@ case optype::op_assign:
|
|||
}
|
||||
|
||||
void
|
||||
DProgressSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DProgressSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&lhs_);
|
||||
gc.forward_pivot_inplace(&rhs_);
|
||||
gc.visit_poly_child(&lhs_);
|
||||
gc.visit_poly_child(&rhs_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -212,9 +212,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DQuoteSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DQuoteSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&expr_);
|
||||
gc.visit_poly_child(&expr_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -184,12 +184,6 @@ namespace xo {
|
|||
);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DSchematikaParser::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DSchematikaParser);
|
||||
}
|
||||
|
||||
DSchematikaParser *
|
||||
DSchematikaParser::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
|
|
@ -202,12 +196,10 @@ namespace xo {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DSchematikaParser::forward_children(obj<ACollector> gc) noexcept
|
||||
void
|
||||
DSchematikaParser::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
psm_.forward_children(gc);
|
||||
|
||||
return this->shallow_size();
|
||||
psm_.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -258,9 +258,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
DSequenceSsm::forward_children(obj<ACollector> gc) noexcept
|
||||
DSequenceSsm::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_inplace(&seq_expr_);
|
||||
gc.visit_child(&seq_expr_);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ namespace xo {
|
|||
refrtag("seqtype", seqtype_));
|
||||
}
|
||||
void
|
||||
DToplevelSeqSsm::forward_children(obj<ACollector> /*gc*/) noexcept
|
||||
DToplevelSeqSsm::visit_gco_children(obj<AGCObjectVisitor>) noexcept
|
||||
{
|
||||
// seqtype_: POD, skip
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ ISyntaxStateMachine_Any::on_quoted_literal(Opaque, obj<AGCObject>, ParserStateMa
|
|||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_Any::forward_children(Opaque, obj<ACollector>) -> void
|
||||
ISyntaxStateMachine_Any::visit_gco_children(Opaque, obj<AGCObjectVisitor>) -> void
|
||||
{
|
||||
_fatal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectExprSsm::forward_children(DExpectExprSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectExprSsm::visit_gco_children(DExpectExprSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::forward_children(DExpectFormalArglistSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::visit_gco_children(DExpectFormalArglistSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQArraySsm::forward_children(DExpectQArraySsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQArraySsm::visit_gco_children(DExpectQArraySsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQListSsm::forward_children(DExpectQListSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQListSsm::visit_gco_children(DExpectQListSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQLiteralSsm::forward_children(DExpectQLiteralSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectQLiteralSsm::visit_gco_children(DExpectQLiteralSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectSymbolSsm::forward_children(DExpectSymbolSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectSymbolSsm::visit_gco_children(DExpectSymbolSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectTypeSsm::forward_children(DExpectTypeSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectTypeSsm::visit_gco_children(DExpectTypeSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DParenSsm::forward_children(DParenSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DParenSsm::visit_gco_children(DParenSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DProgressSsm::forward_children(DProgressSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DProgressSsm::visit_gco_children(DProgressSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::forward_children(DSequenceSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DSequenceSsm::visit_gco_children(DSequenceSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DToplevelSeqSsm::forward_children(DToplevelSeqSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DToplevelSeqSsm::visit_gco_children(DToplevelSeqSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -106,12 +106,12 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
ParserResult::forward_children(obj<ACollector> gc) noexcept
|
||||
ParserResult::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
// {result_type_, error_src_fn_}: pod, ignore
|
||||
|
||||
gc.forward_pivot_inplace(&result_expr_);
|
||||
gc.forward_inplace(const_cast<DString **>(&error_description_));
|
||||
gc.visit_poly_child(&result_expr_);
|
||||
gc.visit_child(&error_description_);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -90,14 +90,14 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
ParserStack::forward_children(obj<ACollector> gc) noexcept
|
||||
ParserStack::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
|
||||
for (ParserStack * target = this; target; target = target->parent_) {
|
||||
// ParserStack::ckp: skip, POD
|
||||
|
||||
if (target->ssm_)
|
||||
target->ssm_.forward_children(gc);
|
||||
target->ssm_.visit_gco_children(gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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*/
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ namespace xo {
|
|||
|
||||
namespace scm {
|
||||
void
|
||||
ReaderResult::forward_children(obj<ACollector> gc) noexcept
|
||||
ReaderResult::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
gc.forward_pivot_inplace(&expr_);
|
||||
gc.visit_poly_child(&expr_);
|
||||
}
|
||||
|
||||
// ----- SchematikaReader -----
|
||||
|
|
@ -208,12 +208,12 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
SchematikaReader::forward_children(obj<ACollector> gc) noexcept
|
||||
SchematikaReader::visit_gco_children(obj<AGCObjectVisitor> gc) noexcept
|
||||
{
|
||||
// tokenizer doesn't contain any gc-aware pointers.
|
||||
|
||||
parser_.forward_children(gc);
|
||||
result_.forward_children(gc);
|
||||
parser_.visit_gco_children(gc);
|
||||
result_.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DGlobalEnv::forward_children(DGlobalEnv & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DGlobalEnv::visit_gco_children(DGlobalEnv & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace xo {
|
|||
return self.shallow_move(gc);
|
||||
}
|
||||
auto
|
||||
IGCObject_DSchematikaParser::forward_children(DSchematikaParser & self, obj<ACollector> gc) noexcept -> void
|
||||
IGCObject_DSchematikaParser::visit_gco_children(DSchematikaParser & self, obj<AGCObjectVisitor> fn) noexcept -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(fn);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DApplySsm::forward_children(DApplySsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DApplySsm::visit_gco_children(DApplySsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DDefineSsm::forward_children(DDefineSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DDefineSsm::visit_gco_children(DDefineSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DDeftypeSsm::forward_children(DDeftypeSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DDeftypeSsm::visit_gco_children(DDeftypeSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ namespace xo {
|
|||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArgSsm::forward_children(DExpectFormalArgSsm & self, obj<ACollector> gc) -> void
|
||||
ISyntaxStateMachine_DExpectFormalArgSsm::visit_gco_children(DExpectFormalArgSsm & self, obj<AGCObjectVisitor> gc) -> void
|
||||
{
|
||||
self.forward_children(gc);
|
||||
self.visit_gco_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue