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

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

View file

@ -5,6 +5,7 @@
#pragma once
#include <xo/stringtable2/StringTable.hpp>
#include <xo/alloc2/Allocator.hpp>
namespace xo {
@ -21,13 +22,16 @@ namespace xo {
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
public:
DSimpleRcx(obj<AAllocator> mm) : allocator_{mm} {}
DSimpleRcx(obj<AAllocator> mm, StringTable * st)
: allocator_{mm}, stringtable_{st} {}
obj<AAllocator> allocator() const noexcept { return allocator_; }
StringTable * stringtable() const noexcept { return stringtable_; }
void visit_pools(const MemorySizeVisitor & visitor) const;
private:
obj<AAllocator> allocator_;
StringTable * stringtable_ = nullptr;
};
} /*namespace scm*/