xo-interpreter2: work towards utest w/ vsm+reader [WIP]
This commit is contained in:
parent
b69098af0d
commit
a10c7dcab2
10 changed files with 224 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
set(SELF_LIB xo_interpreter2)
|
||||
set(SELF_SRCS
|
||||
init_interpreter2.cpp
|
||||
VirtualSchematikaMachine.cpp
|
||||
#IExpression_Any.cpp
|
||||
#interpreter2_register_facets.cpp
|
||||
|
|
@ -9,7 +10,7 @@ set(SELF_SRCS
|
|||
|
||||
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})
|
||||
# note: deps here must also appear in cmake/xo_interpreter2Config.cmake.in
|
||||
xo_dependency(${SELF_LIB} xo_expression2)
|
||||
xo_dependency(${SELF_LIB} xo_reader2)
|
||||
xo_dependency(${SELF_LIB} xo_gc)
|
||||
#xo_dependency(${SELF_LIB} reflect)
|
||||
#xo_dependency(${SELF_LIB} xo_printable2)
|
||||
|
|
|
|||
|
|
@ -6,12 +6,19 @@
|
|||
#include "VirtualSchematikaMachine.hpp"
|
||||
#include <xo/expression2/detail/IExpression_DConstant.hpp>
|
||||
#include <xo/expression2/DConstant.hpp>
|
||||
#include <xo/gc/DX1Collector.hpp>
|
||||
#include <xo/gc/detail/IAllocator_DX1Collector.hpp>
|
||||
#include <cassert>
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::DX1Collector;
|
||||
|
||||
namespace scm {
|
||||
|
||||
VirtualSchematikaMachine::VirtualSchematikaMachine()
|
||||
VirtualSchematikaMachine::VirtualSchematikaMachine(const VsmConfig & config)
|
||||
: config_{config},
|
||||
mm_(box<AAllocator,DX1Collector>(new DX1Collector(config.x1_config_))),
|
||||
reader_{config.rdr_config_, mm_.to_op()}
|
||||
{}
|
||||
|
||||
void
|
||||
|
|
|
|||
50
src/interpreter2/init_interpreter2.cpp
Normal file
50
src/interpreter2/init_interpreter2.cpp
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/** @file init_interpreter2.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
||||
#include "init_interpreter2.hpp"
|
||||
|
||||
#ifdef NOT_YET
|
||||
#include "interpreter2_register_facets.hpp"
|
||||
#include "interpreter2_register_types.hpp"
|
||||
#endif
|
||||
|
||||
#include <xo/reader2/init_reader2.hpp>
|
||||
#ifdef NOT_YET
|
||||
#include <xo/gc/CollectorTypeRegistry.hpp>
|
||||
#endif
|
||||
|
||||
namespace xo {
|
||||
#ifdef NOT_YET
|
||||
using xo::scm::interpreter2_register_facets;
|
||||
using xo::scm::interpreter2_register_types;
|
||||
using xo::mm::CollectorTypeRegistry;
|
||||
#endif
|
||||
|
||||
void
|
||||
InitSubsys<S_interpreter2_tag>::init()
|
||||
{
|
||||
#ifdef NOT_YET
|
||||
interpreter2_register_facets();
|
||||
|
||||
CollectorTypeRegistry::instance().register_types(&interpreter2_register_types);
|
||||
#endif
|
||||
}
|
||||
|
||||
InitEvidence
|
||||
InitSubsys<S_interpreter2_tag>::require()
|
||||
{
|
||||
InitEvidence retval;
|
||||
|
||||
/* direct subsystem deps for xo-interpreter2/ */
|
||||
retval ^= InitSubsys<S_reader2_tag>::require();
|
||||
|
||||
/* xo-interpreter2/'s own initialization code */
|
||||
retval ^= Subsystem::provide<S_interpreter2_tag>("interpreter2", &init);
|
||||
|
||||
return retval;
|
||||
}
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end init_interpreter2.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue