diff --git a/idl/SyntaxStateMachine.json5 b/idl/SyntaxStateMachine.json5 index 8450b02b..d47656b7 100644 --- a/idl/SyntaxStateMachine.json5 +++ b/idl/SyntaxStateMachine.json5 @@ -10,7 +10,7 @@ "", "", "", - "" + "" ], // 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", name: "gc"}, + {type: "obj", name: "gc"}, ], } ], diff --git a/include/xo/reader2/DDefineSsm.hpp b/include/xo/reader2/DDefineSsm.hpp index e372e299..e31c3b2a 100644 --- a/include/xo/reader2/DDefineSsm.hpp +++ b/include/xo/reader2/DDefineSsm.hpp @@ -73,7 +73,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc); + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectExprSsm.hpp b/include/xo/reader2/DExpectExprSsm.hpp index a1ba1c69..e73e1f16 100644 --- a/include/xo/reader2/DExpectExprSsm.hpp +++ b/include/xo/reader2/DExpectExprSsm.hpp @@ -6,7 +6,6 @@ #pragma once #include "DSyntaxStateMachine.hpp" -//#include "ParserStateMachine.hpp" #include "syntaxstatetype.hpp" #include #include @@ -18,7 +17,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectFormalArglistSsm.hpp b/include/xo/reader2/DExpectFormalArglistSsm.hpp index f28cbac1..954cdc72 100644 --- a/include/xo/reader2/DExpectFormalArglistSsm.hpp +++ b/include/xo/reader2/DExpectFormalArglistSsm.hpp @@ -55,7 +55,7 @@ namespace xo { class DExpectFormalArglistSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectQArraySsm.hpp b/include/xo/reader2/DExpectQArraySsm.hpp index 068a5b93..2ec32eb4 100644 --- a/include/xo/reader2/DExpectQArraySsm.hpp +++ b/include/xo/reader2/DExpectQArraySsm.hpp @@ -7,7 +7,6 @@ #include "DSyntaxStateMachine.hpp" #include -//#include #include namespace xo { @@ -58,7 +57,7 @@ namespace xo { class DExpectQArraySsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectQListSsm.hpp b/include/xo/reader2/DExpectQListSsm.hpp index c2119c8b..3b9ab53d 100644 --- a/include/xo/reader2/DExpectQListSsm.hpp +++ b/include/xo/reader2/DExpectQListSsm.hpp @@ -58,7 +58,7 @@ namespace xo { class DExpectQListSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectQLiteralSsm.hpp b/include/xo/reader2/DExpectQLiteralSsm.hpp index f037c7d8..2538fb6f 100644 --- a/include/xo/reader2/DExpectQLiteralSsm.hpp +++ b/include/xo/reader2/DExpectQLiteralSsm.hpp @@ -15,7 +15,7 @@ namespace xo { class DExpectQLiteralSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DExpectSymbolSsm.hpp b/include/xo/reader2/DExpectSymbolSsm.hpp index 9ca3e1a0..f4c3c156 100644 --- a/include/xo/reader2/DExpectSymbolSsm.hpp +++ b/include/xo/reader2/DExpectSymbolSsm.hpp @@ -21,7 +21,7 @@ namespace xo { class DExpectSymbolSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} }; diff --git a/include/xo/reader2/DExpectTypeSsm.hpp b/include/xo/reader2/DExpectTypeSsm.hpp index 7fae992d..d405e916 100644 --- a/include/xo/reader2/DExpectTypeSsm.hpp +++ b/include/xo/reader2/DExpectTypeSsm.hpp @@ -28,7 +28,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DGlobalEnv.hpp b/include/xo/reader2/DGlobalEnv.hpp index 96cd5771..04605c4c 100644 --- a/include/xo/reader2/DGlobalEnv.hpp +++ b/include/xo/reader2/DGlobalEnv.hpp @@ -7,6 +7,7 @@ #include #include +#include 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 gc) noexcept; - std::size_t forward_children(obj gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} /** @defgroup scm-globalenv-printable-facet **/ diff --git a/include/xo/reader2/DProgressSsm.hpp b/include/xo/reader2/DProgressSsm.hpp index 487ba141..372b3af6 100644 --- a/include/xo/reader2/DProgressSsm.hpp +++ b/include/xo/reader2/DProgressSsm.hpp @@ -7,7 +7,6 @@ #include "DSyntaxStateMachine.hpp" #include "syntaxstatetype.hpp" -//#include #include #ifdef NOT_YET @@ -90,7 +89,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DQuoteSsm.hpp b/include/xo/reader2/DQuoteSsm.hpp index fa598f83..542342ef 100644 --- a/include/xo/reader2/DQuoteSsm.hpp +++ b/include/xo/reader2/DQuoteSsm.hpp @@ -65,7 +65,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} private: diff --git a/include/xo/reader2/DSequenceSsm.hpp b/include/xo/reader2/DSequenceSsm.hpp index e3c699c3..a7819048 100644 --- a/include/xo/reader2/DSequenceSsm.hpp +++ b/include/xo/reader2/DSequenceSsm.hpp @@ -29,7 +29,7 @@ namespace xo { class DSequenceSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/DToplevelSeqSsm.hpp b/include/xo/reader2/DToplevelSeqSsm.hpp index b33707e4..4103f45a 100644 --- a/include/xo/reader2/DToplevelSeqSsm.hpp +++ b/include/xo/reader2/DToplevelSeqSsm.hpp @@ -40,7 +40,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/ParserResult.hpp b/include/xo/reader2/ParserResult.hpp index 73ab38c6..823372da 100644 --- a/include/xo/reader2/ParserResult.hpp +++ b/include/xo/reader2/ParserResult.hpp @@ -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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; public: /** none|expression|error_description diff --git a/include/xo/reader2/ParserStack.hpp b/include/xo/reader2/ParserStack.hpp index 80049a07..e4b414b4 100644 --- a/include/xo/reader2/ParserStack.hpp +++ b/include/xo/reader2/ParserStack.hpp @@ -6,6 +6,7 @@ #pragma once #include "SyntaxStateMachine.hpp" +#include #include #include #include @@ -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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; private: /** stack pointer: top of stack just before this instance created **/ diff --git a/include/xo/reader2/ParserStateMachine.hpp b/include/xo/reader2/ParserStateMachine.hpp index cc313660..fedd574d 100644 --- a/include/xo/reader2/ParserStateMachine.hpp +++ b/include/xo/reader2/ParserStateMachine.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/QuoteSsm.hpp b/include/xo/reader2/QuoteSsm.hpp index c0fb5429..801179e9 100644 --- a/include/xo/reader2/QuoteSsm.hpp +++ b/include/xo/reader2/QuoteSsm.hpp @@ -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 */ diff --git a/include/xo/reader2/SchematikaReader.hpp b/include/xo/reader2/SchematikaReader.hpp index de3da42f..d70c2c04 100644 --- a/include/xo/reader2/SchematikaReader.hpp +++ b/include/xo/reader2/SchematikaReader.hpp @@ -8,17 +8,19 @@ #include "ReaderConfig.hpp" #include "SchematikaParser.hpp" #include +#include namespace xo { namespace scm { struct ReaderResult { using ACollector = xo::mm::ACollector; + using AGCObjectVisitor = xo::mm::AGCObjectVisitor; using span_type = xo::mm::span; bool is_tk_error() const { return tk_error_.is_error(); } /** forward gc-aware pointers (called during gc cycle) **/ - void forward_children(obj gc) noexcept; + void visit_gco_children(obj gc) noexcept; /** schematika expression parsed from input **/ obj 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; @@ -107,7 +110,7 @@ namespace xo { void reset_to_idle_toplevel(); /** update gc-aware child pointers **/ - void forward_children(obj gc) noexcept; + void visit_gco_children(obj gc) noexcept; private: /** tokenizer converts a stream of chars diff --git a/include/xo/reader2/apply/DApplySsm.hpp b/include/xo/reader2/apply/DApplySsm.hpp index 64513f0c..f7ee1cce 100644 --- a/include/xo/reader2/apply/DApplySsm.hpp +++ b/include/xo/reader2/apply/DApplySsm.hpp @@ -65,7 +65,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/apply/ISyntaxStateMachine_DApplySsm.hpp b/include/xo/reader2/apply/ISyntaxStateMachine_DApplySsm.hpp index 04c7bddb..db3a147d 100644 --- a/include/xo/reader2/apply/ISyntaxStateMachine_DApplySsm.hpp +++ b/include/xo/reader2/apply/ISyntaxStateMachine_DApplySsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DApplySsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DApplySsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp b/include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp index 3487a328..d5338cd5 100644 --- a/include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp +++ b/include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DDefineSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DDefineSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/deftype/DDeftypeSsm.hpp b/include/xo/reader2/deftype/DDeftypeSsm.hpp index a3e4c6cb..b1a6d910 100644 --- a/include/xo/reader2/deftype/DDeftypeSsm.hpp +++ b/include/xo/reader2/deftype/DDeftypeSsm.hpp @@ -66,7 +66,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/deftype/ISyntaxStateMachine_DDeftypeSsm.hpp b/include/xo/reader2/deftype/ISyntaxStateMachine_DDeftypeSsm.hpp index f3776f18..9bfdfba5 100644 --- a/include/xo/reader2/deftype/ISyntaxStateMachine_DDeftypeSsm.hpp +++ b/include/xo/reader2/deftype/ISyntaxStateMachine_DDeftypeSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DDeftypeSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DDeftypeSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp b/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp index 88bc11b1..8e97a792 100644 --- a/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp +++ b/include/xo/reader2/env/IGCObject_DGlobalEnv.hpp @@ -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 gc) noexcept; - /** during GC: forward immdiate children **/ - static void forward_children(DGlobalEnv & self, obj 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 fn) noexcept; ///@} }; diff --git a/include/xo/reader2/expect_formal_arg/DExpectFormalArgSsm.hpp b/include/xo/reader2/expect_formal_arg/DExpectFormalArgSsm.hpp index 318e340a..5c7e6dec 100644 --- a/include/xo/reader2/expect_formal_arg/DExpectFormalArgSsm.hpp +++ b/include/xo/reader2/expect_formal_arg/DExpectFormalArgSsm.hpp @@ -48,7 +48,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/expect_formal_arg/ISyntaxStateMachine_DExpectFormalArgSsm.hpp b/include/xo/reader2/expect_formal_arg/ISyntaxStateMachine_DExpectFormalArgSsm.hpp index 7e100e40..a880fad3 100644 --- a/include/xo/reader2/expect_formal_arg/ISyntaxStateMachine_DExpectFormalArgSsm.hpp +++ b/include/xo/reader2/expect_formal_arg/ISyntaxStateMachine_DExpectFormalArgSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectFormalArgSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectFormalArgSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/expect_listtype/DExpectListTypeSsm.hpp b/include/xo/reader2/expect_listtype/DExpectListTypeSsm.hpp index 6e7c80b4..eeadd15c 100644 --- a/include/xo/reader2/expect_listtype/DExpectListTypeSsm.hpp +++ b/include/xo/reader2/expect_listtype/DExpectListTypeSsm.hpp @@ -62,7 +62,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} private: diff --git a/include/xo/reader2/expect_listtype/ISyntaxStateMachine_DExpectListTypeSsm.hpp b/include/xo/reader2/expect_listtype/ISyntaxStateMachine_DExpectListTypeSsm.hpp index 153c47a4..9ed4214c 100644 --- a/include/xo/reader2/expect_listtype/ISyntaxStateMachine_DExpectListTypeSsm.hpp +++ b/include/xo/reader2/expect_listtype/ISyntaxStateMachine_DExpectListTypeSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectListTypeSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectListTypeSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/expect_qdict/DExpectQDictSsm.hpp b/include/xo/reader2/expect_qdict/DExpectQDictSsm.hpp index 31aa2be3..5ed40fab 100644 --- a/include/xo/reader2/expect_qdict/DExpectQDictSsm.hpp +++ b/include/xo/reader2/expect_qdict/DExpectQDictSsm.hpp @@ -63,7 +63,7 @@ namespace xo { class DExpectQDictSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/expect_qdict/ISyntaxStateMachine_DExpectQDictSsm.hpp b/include/xo/reader2/expect_qdict/ISyntaxStateMachine_DExpectQDictSsm.hpp index 7014238f..c629e07b 100644 --- a/include/xo/reader2/expect_qdict/ISyntaxStateMachine_DExpectQDictSsm.hpp +++ b/include/xo/reader2/expect_qdict/ISyntaxStateMachine_DExpectQDictSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectQDictSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectQDictSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ifelse/DIfElseSsm.hpp b/include/xo/reader2/ifelse/DIfElseSsm.hpp index 27043bdf..fd7b8168 100644 --- a/include/xo/reader2/ifelse/DIfElseSsm.hpp +++ b/include/xo/reader2/ifelse/DIfElseSsm.hpp @@ -55,7 +55,7 @@ namespace xo { class DIfElseSsm : public DSyntaxStateMachine { public: using Super = DSyntaxStateMachine; - 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/ifelse/ISyntaxStateMachine_DIfElseSsm.hpp b/include/xo/reader2/ifelse/ISyntaxStateMachine_DIfElseSsm.hpp index 8a3991fb..17f6b4cd 100644 --- a/include/xo/reader2/ifelse/ISyntaxStateMachine_DIfElseSsm.hpp +++ b/include/xo/reader2/ifelse/ISyntaxStateMachine_DIfElseSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DIfElseSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DIfElseSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/lambda/DLambdaSsm.hpp b/include/xo/reader2/lambda/DLambdaSsm.hpp index 1fa1eac9..7b16503b 100644 --- a/include/xo/reader2/lambda/DLambdaSsm.hpp +++ b/include/xo/reader2/lambda/DLambdaSsm.hpp @@ -59,7 +59,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/lambda/ISyntaxStateMachine_DLambdaSsm.hpp b/include/xo/reader2/lambda/ISyntaxStateMachine_DLambdaSsm.hpp index f10f376e..db67ee9a 100644 --- a/include/xo/reader2/lambda/ISyntaxStateMachine_DLambdaSsm.hpp +++ b/include/xo/reader2/lambda/ISyntaxStateMachine_DLambdaSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DLambdaSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DLambdaSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/paren/DParenSsm.hpp b/include/xo/reader2/paren/DParenSsm.hpp index af9daa91..e70ba255 100644 --- a/include/xo/reader2/paren/DParenSsm.hpp +++ b/include/xo/reader2/paren/DParenSsm.hpp @@ -50,7 +50,7 @@ namespace xo { public: using Super = DSyntaxStateMachine; 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 gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} diff --git a/include/xo/reader2/paren/ISyntaxStateMachine_DParenSsm.hpp b/include/xo/reader2/paren/ISyntaxStateMachine_DParenSsm.hpp index c2bbcc21..4dd7ef74 100644 --- a/include/xo/reader2/paren/ISyntaxStateMachine_DParenSsm.hpp +++ b/include/xo/reader2/paren/ISyntaxStateMachine_DParenSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DParenSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DParenSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/parser/DSchematikaParser.hpp b/include/xo/reader2/parser/DSchematikaParser.hpp index 07c85e4f..c3de4930 100644 --- a/include/xo/reader2/parser/DSchematikaParser.hpp +++ b/include/xo/reader2/parser/DSchematikaParser.hpp @@ -10,6 +10,7 @@ #include "ParserResult.hpp" #include #include +#include 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 gc) noexcept; /** forward gc-aware children **/ - std::size_t forward_children(obj gc) noexcept; + void visit_gco_children(obj gc) noexcept; ///@} private: diff --git a/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp b/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp index 39f61b9b..f2ca67de 100644 --- a/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp +++ b/include/xo/reader2/parser/IGCObject_DSchematikaParser.hpp @@ -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 gc) noexcept; - /** during GC: forward immdiate children **/ - static void forward_children(DSchematikaParser & self, obj 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 fn) noexcept; ///@} }; diff --git a/include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp b/include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp index 811119c5..35dc5da1 100644 --- a/include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp +++ b/include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DQuoteSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DQuoteSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ASyntaxStateMachine.hpp b/include/xo/reader2/ssm/ASyntaxStateMachine.hpp index ead25e24..07d992c1 100644 --- a/include/xo/reader2/ssm/ASyntaxStateMachine.hpp +++ b/include/xo/reader2/ssm/ASyntaxStateMachine.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -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 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 lit, ParserStateMachine * p_psm) = 0; - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - virtual void forward_children(Opaque data, obj 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 gc) = 0; ///@} }; /*ASyntaxStateMachine*/ diff --git a/include/xo/reader2/ssm/IPrintable_DQuoteSsm.hpp b/include/xo/reader2/ssm/IPrintable_DQuoteSsm.hpp deleted file mode 100644 index 2b969c50..00000000 --- a/include/xo/reader2/ssm/IPrintable_DQuoteSsm.hpp +++ /dev/null @@ -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 -#include -#include "DQuoteSsm.hpp" - -namespace xo { namespace scm { class IPrintable_DQuoteSsm; } } - -namespace xo { - namespace facet { - template <> - struct FacetImplementation - { - using ImplType = xo::print::IPrintable_Xfer - ; - }; - } -} - -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 */ \ No newline at end of file diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_Any.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_Any.hpp index d1077f2a..34e7ec84 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_Any.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_Any.hpp @@ -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, ParserStateMachine *) override; [[noreturn]] void on_parsed_expression_with_token(Opaque, obj, const Token &, ParserStateMachine *) override; [[noreturn]] void on_quoted_literal(Opaque, obj, ParserStateMachine *) override; - [[noreturn]] void forward_children(Opaque, obj) override; + [[noreturn]] void visit_gco_children(Opaque, obj) override; ///@} diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectExprSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectExprSsm.hpp index 79801c00..5ca9f1c0 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectExprSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectExprSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectExprSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectExprSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp index 68151e22..04da69bd 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectFormalArglistSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectFormalArglistSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQArraySsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQArraySsm.hpp index cf6ae53d..7b345008 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQArraySsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQArraySsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectQArraySsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectQArraySsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQListSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQListSsm.hpp index 38a33d20..ea0cb3c2 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQListSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQListSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectQListSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectQListSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQLiteralSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQLiteralSsm.hpp index 4cd123f7..4a4bdbfb 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQLiteralSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectQLiteralSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectQLiteralSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectQLiteralSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp index 0ed37f25..e3cf7146 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectSymbolSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectSymbolSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectTypeSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectTypeSsm.hpp index ea084f51..965212d1 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectTypeSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DExpectTypeSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DExpectTypeSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DExpectTypeSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DProgressSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DProgressSsm.hpp index 24269888..7c12ee39 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DProgressSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DProgressSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DProgressSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DProgressSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DQuoteSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DQuoteSsm.hpp deleted file mode 100644 index 811119c5..00000000 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DQuoteSsm.hpp +++ /dev/null @@ -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 - { - using ImplType = xo::scm::ISyntaxStateMachine_Xfer - ; - }; - } -} - -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 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 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 expr, const Token & tk, ParserStateMachine * p_psm); - /** update state machine for nested quoted literal @p lit **/ - static void on_quoted_literal(DQuoteSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DQuoteSsm & self, obj gc); - ///@} - }; - - } /*namespace scm*/ -} /*namespace xo*/ - -/* end */ \ No newline at end of file diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DSequenceSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DSequenceSsm.hpp index f19601b5..b35d45a1 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DSequenceSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DSequenceSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DSequenceSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DSequenceSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_DToplevelSeqSsm.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_DToplevelSeqSsm.hpp index b36cbfc6..695da17c 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_DToplevelSeqSsm.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_DToplevelSeqSsm.hpp @@ -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 expr, const Token & tk, ParserStateMachine * p_psm); /** update state machine for nested quoted literal @p lit **/ static void on_quoted_literal(DToplevelSeqSsm & self, obj lit, ParserStateMachine * p_psm); - /** gc support: move immediate children to to-space and sub forwarding pointer **/ - static void forward_children(DToplevelSeqSsm & self, obj 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 gc); ///@} }; diff --git a/include/xo/reader2/ssm/ISyntaxStateMachine_Xfer.hpp b/include/xo/reader2/ssm/ISyntaxStateMachine_Xfer.hpp index 13b6d1b7..df1a87f4 100644 --- a/include/xo/reader2/ssm/ISyntaxStateMachine_Xfer.hpp +++ b/include/xo/reader2/ssm/ISyntaxStateMachine_Xfer.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include 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 lit, ParserStateMachine * p_psm) override { return I::on_quoted_literal(_dcast(data), lit, p_psm); } - void forward_children(Opaque data, obj gc) override { - return I::forward_children(_dcast(data), gc); + void visit_gco_children(Opaque data, obj gc) override { + return I::visit_gco_children(_dcast(data), gc); } ///@} diff --git a/include/xo/reader2/ssm/RSyntaxStateMachine.hpp b/include/xo/reader2/ssm/RSyntaxStateMachine.hpp index 57cc885e..9c8a8274 100644 --- a/include/xo/reader2/ssm/RSyntaxStateMachine.hpp +++ b/include/xo/reader2/ssm/RSyntaxStateMachine.hpp @@ -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 lit, ParserStateMachine * p_psm) { return O::iface()->on_quoted_literal(O::data(), lit, p_psm); } - void forward_children(obj gc) { - return O::iface()->forward_children(O::data(), gc); + void visit_gco_children(obj gc) { + return O::iface()->visit_gco_children(O::data(), gc); } ///@} diff --git a/src/reader2/DApplySsm.cpp b/src/reader2/DApplySsm.cpp index c465ce1a..1787d560 100644 --- a/src/reader2/DApplySsm.cpp +++ b/src/reader2/DApplySsm.cpp @@ -397,10 +397,10 @@ namespace xo { } void - DApplySsm::forward_children(obj gc) noexcept + DApplySsm::visit_gco_children(obj 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*/ diff --git a/src/reader2/DDefineSsm.cpp b/src/reader2/DDefineSsm.cpp index f9be0335..1ee8e3aa 100644 --- a/src/reader2/DDefineSsm.cpp +++ b/src/reader2/DDefineSsm.cpp @@ -692,9 +692,9 @@ namespace xo { // ----- gc support ----- void - DDefineSsm::forward_children(obj gc) + DDefineSsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&def_expr_.data_); + gc.visit_child(&def_expr_.data_); } } /*namespace scm*/ } /*namespace xo*/ diff --git a/src/reader2/DDeftypeSsm.cpp b/src/reader2/DDeftypeSsm.cpp index 3f377113..0007d940 100644 --- a/src/reader2/DDeftypeSsm.cpp +++ b/src/reader2/DDeftypeSsm.cpp @@ -271,7 +271,7 @@ namespace xo { refrtag("expect", this->get_expect_str())); } void - DDeftypeSsm::forward_children(obj /*gc*/) noexcept + DDeftypeSsm::visit_gco_children(obj) noexcept { static_assert(!DUniqueString::is_gc_eligible()); } diff --git a/src/reader2/DExpectExprSsm.cpp b/src/reader2/DExpectExprSsm.cpp index 6a9d08e7..bce870f6 100644 --- a/src/reader2/DExpectExprSsm.cpp +++ b/src/reader2/DExpectExprSsm.cpp @@ -625,7 +625,7 @@ namespace xo { #endif void - DExpectExprSsm::forward_children(obj /*gc*/) noexcept + DExpectExprSsm::visit_gco_children(obj) noexcept { // all members POD, skip } diff --git a/src/reader2/DExpectFormalArgSsm.cpp b/src/reader2/DExpectFormalArgSsm.cpp index d7e903d8..7a529983 100644 --- a/src/reader2/DExpectFormalArgSsm.cpp +++ b/src/reader2/DExpectFormalArgSsm.cpp @@ -265,7 +265,7 @@ namespace xo { } void - DExpectFormalArgSsm::forward_children(obj /*gc*/) noexcept + DExpectFormalArgSsm::visit_gco_children(obj) noexcept { static_assert(!DUniqueString::is_gc_eligible()); } diff --git a/src/reader2/DExpectFormalArglistSsm.cpp b/src/reader2/DExpectFormalArglistSsm.cpp index ab7d19ee..6cbf199a 100644 --- a/src/reader2/DExpectFormalArglistSsm.cpp +++ b/src/reader2/DExpectFormalArglistSsm.cpp @@ -358,9 +358,9 @@ namespace xo { } void - DExpectFormalArglistSsm::forward_children(obj gc) noexcept + DExpectFormalArglistSsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&argl_); + gc.visit_child(&argl_); } } /*namespace scm*/ diff --git a/src/reader2/DExpectListTypeSsm.cpp b/src/reader2/DExpectListTypeSsm.cpp index 921c562e..001ff254 100644 --- a/src/reader2/DExpectListTypeSsm.cpp +++ b/src/reader2/DExpectListTypeSsm.cpp @@ -204,9 +204,9 @@ namespace xo { } void - DExpectListTypeSsm::forward_children(obj gc) noexcept + DExpectListTypeSsm::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&elt_type_); + gc.visit_poly_child(&elt_type_); } } /*namespace scm*/ diff --git a/src/reader2/DExpectQArraySsm.cpp b/src/reader2/DExpectQArraySsm.cpp index 3d373783..9e281f8c 100644 --- a/src/reader2/DExpectQArraySsm.cpp +++ b/src/reader2/DExpectQArraySsm.cpp @@ -220,9 +220,9 @@ namespace xo { refrtag("array", array_pr)); } void - DExpectQArraySsm::forward_children(obj gc) noexcept + DExpectQArraySsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&array_); + gc.visit_child(&array_); } } diff --git a/src/reader2/DExpectQDictSsm.cpp b/src/reader2/DExpectQDictSsm.cpp index b57887cb..9839ffd2 100644 --- a/src/reader2/DExpectQDictSsm.cpp +++ b/src/reader2/DExpectQDictSsm.cpp @@ -267,10 +267,10 @@ namespace xo { void - DExpectQDictSsm::forward_children(obj gc) noexcept + DExpectQDictSsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(const_cast(&key_)); - gc.forward_inplace(&dict_); + gc.visit_child(&key_); + gc.visit_child(&dict_); } } /*namespace scm*/ diff --git a/src/reader2/DExpectQListSsm.cpp b/src/reader2/DExpectQListSsm.cpp index 59df8c2c..965351c3 100644 --- a/src/reader2/DExpectQListSsm.cpp +++ b/src/reader2/DExpectQListSsm.cpp @@ -215,10 +215,10 @@ namespace xo { refrtag("list", list_pr)); } void - DExpectQListSsm::forward_children(obj gc) noexcept + DExpectQListSsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&start_); - gc.forward_inplace(&end_); + gc.visit_child(&start_); + gc.visit_child(&end_); } } diff --git a/src/reader2/DExpectQLiteralSsm.cpp b/src/reader2/DExpectQLiteralSsm.cpp index b87eff24..c49cf565 100644 --- a/src/reader2/DExpectQLiteralSsm.cpp +++ b/src/reader2/DExpectQLiteralSsm.cpp @@ -256,7 +256,7 @@ namespace xo { refrtag("expect", this->get_expect_str())); } void - DExpectQLiteralSsm::forward_children(obj /*gc*/) noexcept + DExpectQLiteralSsm::visit_gco_children(obj) noexcept { // cxl_on_rightparen_, cxl_on_rightbracket_: POD, skip } diff --git a/src/reader2/DExpectSymbolSsm.cpp b/src/reader2/DExpectSymbolSsm.cpp index 0875a044..fa1372b1 100644 --- a/src/reader2/DExpectSymbolSsm.cpp +++ b/src/reader2/DExpectSymbolSsm.cpp @@ -146,7 +146,7 @@ namespace xo { ); } void - DExpectSymbolSsm::forward_children(obj /*gc*/) noexcept + DExpectSymbolSsm::visit_gco_children(obj) noexcept { // no gc-aware members } diff --git a/src/reader2/DExpectTypeSsm.cpp b/src/reader2/DExpectTypeSsm.cpp index b25c9380..47cc5a6c 100644 --- a/src/reader2/DExpectTypeSsm.cpp +++ b/src/reader2/DExpectTypeSsm.cpp @@ -198,7 +198,7 @@ namespace xo { } void - DExpectTypeSsm::forward_children(obj /*gc*/) noexcept + DExpectTypeSsm::visit_gco_children(obj) noexcept { // corrected_: POD, skip } diff --git a/src/reader2/DGlobalEnv.cpp b/src/reader2/DGlobalEnv.cpp index 2893beda..64eabd4f 100644 --- a/src/reader2/DGlobalEnv.cpp +++ b/src/reader2/DGlobalEnv.cpp @@ -107,25 +107,17 @@ namespace xo { // ----- AGCObject facet ----- - std::size_t - DGlobalEnv::shallow_size() const noexcept - { - return sizeof(*this); - } - DGlobalEnv * DGlobalEnv::shallow_move(obj gc) noexcept { return gc.std_move_for(this); } - std::size_t - DGlobalEnv::forward_children(obj gc) noexcept + void + DGlobalEnv::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&symtab_); - gc.forward_inplace(&values_); - - return this->shallow_size(); + gc.visit_child(&symtab_); + gc.visit_child(&values_); } // ----- APrintable facet ----- diff --git a/src/reader2/DIfElseSsm.cpp b/src/reader2/DIfElseSsm.cpp index 03bd1589..f4fd4f88 100644 --- a/src/reader2/DIfElseSsm.cpp +++ b/src/reader2/DIfElseSsm.cpp @@ -510,9 +510,9 @@ namespace xo { } void - DIfElseSsm::forward_children(obj gc) noexcept + DIfElseSsm::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&if_expr_); + gc.visit_poly_child(&if_expr_); } } /*namespace scm*/ } /*namespace xo*/ diff --git a/src/reader2/DLambdaSsm.cpp b/src/reader2/DLambdaSsm.cpp index d23f04e6..f0fed420 100644 --- a/src/reader2/DLambdaSsm.cpp +++ b/src/reader2/DLambdaSsm.cpp @@ -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 #include -//#include //#include #include #include @@ -474,15 +471,15 @@ namespace xo { } void - DLambdaSsm::forward_children(obj gc) noexcept + DLambdaSsm::visit_gco_children(obj 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*/ diff --git a/src/reader2/DParenSsm.cpp b/src/reader2/DParenSsm.cpp index 13fb728a..82320cb6 100644 --- a/src/reader2/DParenSsm.cpp +++ b/src/reader2/DParenSsm.cpp @@ -459,9 +459,9 @@ namespace xo { } void - DParenSsm::forward_children(obj gc) noexcept + DParenSsm::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&expr_); + gc.visit_poly_child(&expr_); } } /*namespace scm*/ } /*namespace xo*/ diff --git a/src/reader2/DProgressSsm.cpp b/src/reader2/DProgressSsm.cpp index 345ba5fd..04c87fac 100644 --- a/src/reader2/DProgressSsm.cpp +++ b/src/reader2/DProgressSsm.cpp @@ -1244,10 +1244,10 @@ case optype::op_assign: } void - DProgressSsm::forward_children(obj gc) noexcept + DProgressSsm::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&lhs_); - gc.forward_pivot_inplace(&rhs_); + gc.visit_poly_child(&lhs_); + gc.visit_poly_child(&rhs_); } } /*namespace scm*/ diff --git a/src/reader2/DQuoteSsm.cpp b/src/reader2/DQuoteSsm.cpp index 3a665eb5..cbbedc73 100644 --- a/src/reader2/DQuoteSsm.cpp +++ b/src/reader2/DQuoteSsm.cpp @@ -212,9 +212,9 @@ namespace xo { } void - DQuoteSsm::forward_children(obj gc) noexcept + DQuoteSsm::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&expr_); + gc.visit_poly_child(&expr_); } } /*namespace scm*/ diff --git a/src/reader2/DSchematikaParser.cpp b/src/reader2/DSchematikaParser.cpp index e25e76aa..1d5ecea7 100644 --- a/src/reader2/DSchematikaParser.cpp +++ b/src/reader2/DSchematikaParser.cpp @@ -184,12 +184,6 @@ namespace xo { ); } - std::size_t - DSchematikaParser::shallow_size() const noexcept - { - return sizeof(DSchematikaParser); - } - DSchematikaParser * DSchematikaParser::shallow_move(obj gc) noexcept { @@ -202,12 +196,10 @@ namespace xo { return nullptr; } - std::size_t - DSchematikaParser::forward_children(obj gc) noexcept + void + DSchematikaParser::visit_gco_children(obj gc) noexcept { - psm_.forward_children(gc); - - return this->shallow_size(); + psm_.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/DSequenceSsm.cpp b/src/reader2/DSequenceSsm.cpp index f6caeb06..a6d4013b 100644 --- a/src/reader2/DSequenceSsm.cpp +++ b/src/reader2/DSequenceSsm.cpp @@ -258,9 +258,9 @@ namespace xo { } void - DSequenceSsm::forward_children(obj gc) noexcept + DSequenceSsm::visit_gco_children(obj gc) noexcept { - gc.forward_inplace(&seq_expr_); + gc.visit_child(&seq_expr_); } } /*namespace scm*/ diff --git a/src/reader2/DToplevelSeqSsm.cpp b/src/reader2/DToplevelSeqSsm.cpp index 9252c700..e660f780 100644 --- a/src/reader2/DToplevelSeqSsm.cpp +++ b/src/reader2/DToplevelSeqSsm.cpp @@ -518,7 +518,7 @@ namespace xo { refrtag("seqtype", seqtype_)); } void - DToplevelSeqSsm::forward_children(obj /*gc*/) noexcept + DToplevelSeqSsm::visit_gco_children(obj) noexcept { // seqtype_: POD, skip } diff --git a/src/reader2/ISyntaxStateMachine_Any.cpp b/src/reader2/ISyntaxStateMachine_Any.cpp index 7d174c5b..a260bdc9 100644 --- a/src/reader2/ISyntaxStateMachine_Any.cpp +++ b/src/reader2/ISyntaxStateMachine_Any.cpp @@ -96,7 +96,7 @@ ISyntaxStateMachine_Any::on_quoted_literal(Opaque, obj, ParserStateMa } auto -ISyntaxStateMachine_Any::forward_children(Opaque, obj) -> void +ISyntaxStateMachine_Any::visit_gco_children(Opaque, obj) -> void { _fatal(); } diff --git a/src/reader2/ISyntaxStateMachine_DExpectExprSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectExprSsm.cpp index 75464bcc..0ecc4e24 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectExprSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectExprSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectExprSsm::forward_children(DExpectExprSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectExprSsm::visit_gco_children(DExpectExprSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp index 61b219f0..4db6a480 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectFormalArglistSsm::forward_children(DExpectFormalArglistSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectFormalArglistSsm::visit_gco_children(DExpectFormalArglistSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectQArraySsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectQArraySsm.cpp index b938f1e7..ea8b14cc 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectQArraySsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectQArraySsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectQArraySsm::forward_children(DExpectQArraySsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectQArraySsm::visit_gco_children(DExpectQArraySsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectQListSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectQListSsm.cpp index 19df0dff..363f9646 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectQListSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectQListSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectQListSsm::forward_children(DExpectQListSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectQListSsm::visit_gco_children(DExpectQListSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectQLiteralSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectQLiteralSsm.cpp index e6f338fc..61e15926 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectQLiteralSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectQLiteralSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectQLiteralSsm::forward_children(DExpectQLiteralSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectQLiteralSsm::visit_gco_children(DExpectQLiteralSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectSymbolSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectSymbolSsm.cpp index b8e8fed0..c1331ceb 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectSymbolSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectSymbolSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectSymbolSsm::forward_children(DExpectSymbolSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectSymbolSsm::visit_gco_children(DExpectSymbolSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DExpectTypeSsm.cpp b/src/reader2/ISyntaxStateMachine_DExpectTypeSsm.cpp index 011edc4f..8daed04c 100644 --- a/src/reader2/ISyntaxStateMachine_DExpectTypeSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DExpectTypeSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectTypeSsm::forward_children(DExpectTypeSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectTypeSsm::visit_gco_children(DExpectTypeSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DParenSsm.cpp b/src/reader2/ISyntaxStateMachine_DParenSsm.cpp index 6ee6902b..42a199cb 100644 --- a/src/reader2/ISyntaxStateMachine_DParenSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DParenSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DParenSsm::forward_children(DParenSsm & self, obj gc) -> void + ISyntaxStateMachine_DParenSsm::visit_gco_children(DParenSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DProgressSsm.cpp b/src/reader2/ISyntaxStateMachine_DProgressSsm.cpp index 01e1e754..9c5ad07d 100644 --- a/src/reader2/ISyntaxStateMachine_DProgressSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DProgressSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DProgressSsm::forward_children(DProgressSsm & self, obj gc) -> void + ISyntaxStateMachine_DProgressSsm::visit_gco_children(DProgressSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp b/src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp index 30e164d8..a6375288 100644 --- a/src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DSequenceSsm::forward_children(DSequenceSsm & self, obj gc) -> void + ISyntaxStateMachine_DSequenceSsm::visit_gco_children(DSequenceSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ISyntaxStateMachine_DToplevelSeqSsm.cpp b/src/reader2/ISyntaxStateMachine_DToplevelSeqSsm.cpp index 73f23da0..47788590 100644 --- a/src/reader2/ISyntaxStateMachine_DToplevelSeqSsm.cpp +++ b/src/reader2/ISyntaxStateMachine_DToplevelSeqSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DToplevelSeqSsm::forward_children(DToplevelSeqSsm & self, obj gc) -> void + ISyntaxStateMachine_DToplevelSeqSsm::visit_gco_children(DToplevelSeqSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/ParserResult.cpp b/src/reader2/ParserResult.cpp index fa9c9591..609f204f 100644 --- a/src/reader2/ParserResult.cpp +++ b/src/reader2/ParserResult.cpp @@ -106,12 +106,12 @@ namespace xo { } void - ParserResult::forward_children(obj gc) noexcept + ParserResult::visit_gco_children(obj gc) noexcept { // {result_type_, error_src_fn_}: pod, ignore - gc.forward_pivot_inplace(&result_expr_); - gc.forward_inplace(const_cast(&error_description_)); + gc.visit_poly_child(&result_expr_); + gc.visit_child(&error_description_); } } /*namespace scm*/ } /*namespace xo*/ diff --git a/src/reader2/ParserStack.cpp b/src/reader2/ParserStack.cpp index f40696b2..721b19b4 100644 --- a/src/reader2/ParserStack.cpp +++ b/src/reader2/ParserStack.cpp @@ -90,14 +90,14 @@ namespace xo { } void - ParserStack::forward_children(obj gc) noexcept + ParserStack::visit_gco_children(obj 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); } } diff --git a/src/reader2/ParserStateMachine.cpp b/src/reader2/ParserStateMachine.cpp index c3d92a0c..6bec1833 100644 --- a/src/reader2/ParserStateMachine.cpp +++ b/src/reader2/ParserStateMachine.cpp @@ -907,7 +907,7 @@ namespace xo { #endif void - ParserStateMachine::forward_children(obj gc) noexcept + ParserStateMachine::visit_gco_children(obj 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*/ diff --git a/src/reader2/SchematikaReader.cpp b/src/reader2/SchematikaReader.cpp index ba681bab..c9405916 100644 --- a/src/reader2/SchematikaReader.cpp +++ b/src/reader2/SchematikaReader.cpp @@ -10,9 +10,9 @@ namespace xo { namespace scm { void - ReaderResult::forward_children(obj gc) noexcept + ReaderResult::visit_gco_children(obj gc) noexcept { - gc.forward_pivot_inplace(&expr_); + gc.visit_poly_child(&expr_); } // ----- SchematikaReader ----- @@ -208,12 +208,12 @@ namespace xo { } void - SchematikaReader::forward_children(obj gc) noexcept + SchematikaReader::visit_gco_children(obj 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*/ diff --git a/src/reader2/facet/IGCObject_DGlobalEnv.cpp b/src/reader2/facet/IGCObject_DGlobalEnv.cpp index 5c61e9ea..e826c422 100644 --- a/src/reader2/facet/IGCObject_DGlobalEnv.cpp +++ b/src/reader2/facet/IGCObject_DGlobalEnv.cpp @@ -21,9 +21,9 @@ namespace xo { return self.shallow_move(gc); } auto - IGCObject_DGlobalEnv::forward_children(DGlobalEnv & self, obj gc) noexcept -> void + IGCObject_DGlobalEnv::visit_gco_children(DGlobalEnv & self, obj fn) noexcept -> void { - self.forward_children(gc); + self.visit_gco_children(fn); } } /*namespace scm*/ diff --git a/src/reader2/facet/IGCObject_DSchematikaParser.cpp b/src/reader2/facet/IGCObject_DSchematikaParser.cpp index 133b3f9c..cd9ec847 100644 --- a/src/reader2/facet/IGCObject_DSchematikaParser.cpp +++ b/src/reader2/facet/IGCObject_DSchematikaParser.cpp @@ -21,9 +21,9 @@ namespace xo { return self.shallow_move(gc); } auto - IGCObject_DSchematikaParser::forward_children(DSchematikaParser & self, obj gc) noexcept -> void + IGCObject_DSchematikaParser::visit_gco_children(DSchematikaParser & self, obj fn) noexcept -> void { - self.forward_children(gc); + self.visit_gco_children(fn); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DApplySsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DApplySsm.cpp index daff54de..01f685fe 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DApplySsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DApplySsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DApplySsm::forward_children(DApplySsm & self, obj gc) -> void + ISyntaxStateMachine_DApplySsm::visit_gco_children(DApplySsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DDefineSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DDefineSsm.cpp index 9867898f..886155c0 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DDefineSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DDefineSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DDefineSsm::forward_children(DDefineSsm & self, obj gc) -> void + ISyntaxStateMachine_DDefineSsm::visit_gco_children(DDefineSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DDeftypeSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DDeftypeSsm.cpp index e6e54b1c..874849ff 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DDeftypeSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DDeftypeSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DDeftypeSsm::forward_children(DDeftypeSsm & self, obj gc) -> void + ISyntaxStateMachine_DDeftypeSsm::visit_gco_children(DDeftypeSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DExpectFormalArgSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DExpectFormalArgSsm.cpp index 059fd4b2..85f8dd7a 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DExpectFormalArgSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DExpectFormalArgSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectFormalArgSsm::forward_children(DExpectFormalArgSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectFormalArgSsm::visit_gco_children(DExpectFormalArgSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DExpectListTypeSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DExpectListTypeSsm.cpp index b760ac9a..d3b292ad 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DExpectListTypeSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DExpectListTypeSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectListTypeSsm::forward_children(DExpectListTypeSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectListTypeSsm::visit_gco_children(DExpectListTypeSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp index 7ee82e82..9f4d74cc 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DExpectQDictSsm::forward_children(DExpectQDictSsm & self, obj gc) -> void + ISyntaxStateMachine_DExpectQDictSsm::visit_gco_children(DExpectQDictSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DIfElseSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DIfElseSsm.cpp index c78464c7..68034ba4 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DIfElseSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DIfElseSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DIfElseSsm::forward_children(DIfElseSsm & self, obj gc) -> void + ISyntaxStateMachine_DIfElseSsm::visit_gco_children(DIfElseSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DLambdaSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DLambdaSsm.cpp index b54d54fc..88e52100 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DLambdaSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DLambdaSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DLambdaSsm::forward_children(DLambdaSsm & self, obj gc) -> void + ISyntaxStateMachine_DLambdaSsm::visit_gco_children(DLambdaSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/ diff --git a/src/reader2/facet/ISyntaxStateMachine_DQuoteSsm.cpp b/src/reader2/facet/ISyntaxStateMachine_DQuoteSsm.cpp index 9624c899..39d26414 100644 --- a/src/reader2/facet/ISyntaxStateMachine_DQuoteSsm.cpp +++ b/src/reader2/facet/ISyntaxStateMachine_DQuoteSsm.cpp @@ -78,9 +78,9 @@ namespace xo { self.on_quoted_literal(lit, p_psm); } auto - ISyntaxStateMachine_DQuoteSsm::forward_children(DQuoteSsm & self, obj gc) -> void + ISyntaxStateMachine_DQuoteSsm::visit_gco_children(DQuoteSsm & self, obj gc) -> void { - self.forward_children(gc); + self.visit_gco_children(gc); } } /*namespace scm*/