xo-interpreter2 stack: + stringtable() in RuntimeContext api

This commit is contained in:
Roland Conybeare 2026-03-16 01:27:25 -05:00
commit 7b8e864668
4 changed files with 11 additions and 0 deletions

View file

@ -88,6 +88,7 @@ namespace xo {
bool debug_flag() const noexcept { return debug_flag_; }
ParserStack * stack() const noexcept { return stack_; }
obj<AAllocator> expr_alloc() const noexcept { return expr_alloc_; }
StringTable * stringtable() noexcept { return &stringtable_; }
DGlobalSymtab * global_symtab() const noexcept { return global_symtab_.data(); }
DLocalSymtab * local_symtab() const noexcept { return local_symtab_; }
DGlobalEnv * global_env() const noexcept { return global_env_.data(); }

View file

@ -185,6 +185,7 @@ namespace xo {
DGlobalSymtab * global_symtab() const noexcept;
DGlobalEnv * global_env() const noexcept;
StringTable * stringtable() noexcept { return psm_.stringtable(); }
bool debug_flag() const { return debug_flag_; }

View file

@ -60,6 +60,9 @@ namespace xo {
/** top-level global environment (e.g. contains built-in primitives) **/
DGlobalEnv * global_env() const noexcept;
/** global unique-string table **/
StringTable * stringtable() noexcept;
/** visit reader-owned memory pools; call visitor(info) for each.
* Specifically exclude expr_alloc, since we don't consider
* that reader-owned

View file

@ -38,6 +38,12 @@ namespace xo {
return parser_.global_env();
}
StringTable *
SchematikaReader::stringtable() noexcept
{
return parser_.stringtable();
}
void
SchematikaReader::visit_pools(const MemorySizeVisitor & visitor) const
{