xo-interpreter2 stack: refactor: do report_memory_use() modular

This commit is contained in:
Roland Conybeare 2026-03-15 12:10:21 -05:00
commit 1f596e6172
7 changed files with 180 additions and 41 deletions

View file

@ -0,0 +1,27 @@
/** @file VsmPrimitives.hpp
*
* @author Roland Conybeare, Mar 2026
**/
#pragma once
#include <xo/procedure2/Primitive_gco_0.hpp>
namespace xo {
namespace scm {
/** @brief primitives centered on interpreter2/ data
*
**/
class VsmPrimitives {
public:
using AAllocator = xo::mm::AAllocator;
public:
/** create primitive: report memory use to console **/
static DPrimitive_gco_0 * make_report_memory_use_pm(obj<AAllocator> mm);
};
} /*namespace scm*/
} /*namespace xo*/
/* end VsmPrimitives.hpp */

View file

@ -0,0 +1,20 @@
/** @file interpreter2_register_primitives.hpp
*
* @author Roland Conybeare, Mar 2026
**/
#pragma once
#include "PrimitiveRegistry.hpp"
#include <xo/alloc2/Collector.hpp>
namespace xo {
namespace scm {
/** Register primitive-factories **/
bool interpreter2_register_primitives(obj<xo::mm::AAllocator> gc,
InstallSink sink,
InstallFlags flags);
}
}
/* end interpreter2_register_primitives.hpp */