xo-expression2 stack: + mvp DGlobalSymtab impl

This commit is contained in:
Roland Conybeare 2026-02-14 13:06:54 -05:00
commit 3e53b0d10a
2 changed files with 24 additions and 0 deletions

View file

@ -37,6 +37,23 @@ namespace xo {
return result;
}
DArray *
DArray::copy(obj<AAllocator> mm,
DArray * src,
size_type new_cap)
{
DArray * dest = empty(mm, new_cap);
/** could just memcpy here **/
for (size_type i = 0, n = src->size(); i < n; ++i) {
dest->elts_[i] = src->elts_[i];
}
dest->size_ = src->size();
return dest;
}
obj<AGCObject>
DArray::at(size_type ix) const
{