xo-interpreter2 stack: + stringtable() in RuntimeContext api
This commit is contained in:
parent
e67117c815
commit
7b8e864668
4 changed files with 11 additions and 0 deletions
|
|
@ -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(); }
|
||||
|
|
|
|||
|
|
@ -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_; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue