xo-interpreter2 stack: refactor: do report_memory_use() modular
This commit is contained in:
parent
be680fcc55
commit
1f596e6172
7 changed files with 180 additions and 41 deletions
27
include/xo/interpreter2/VsmPrimitives.hpp
Normal file
27
include/xo/interpreter2/VsmPrimitives.hpp
Normal 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 */
|
||||
20
include/xo/interpreter2/interpreter2_register_primitives.hpp
Normal file
20
include/xo/interpreter2/interpreter2_register_primitives.hpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue