xo-interpreter2: + DGlobalEnv::_upsert_value()

This commit is contained in:
Roland Conybeare 2026-02-28 13:22:59 +11:00
commit 5675e12d97
2 changed files with 26 additions and 0 deletions

View file

@ -25,6 +25,7 @@ namespace xo {
**/
class DGlobalEnv {
public:
using TypeDescr = xo::reflect::TypeDescr;
using ACollector = xo::mm::ACollector;
using AAllocator = xo::mm::AAllocator;
using AGCObject = xo::mm::AGCObject;
@ -57,6 +58,14 @@ namespace xo {
**/
void assign_value(obj<AAllocator> mm, Binding ix, obj<AGCObject> x);
/** create/establish global for symbol @p sym with resolved type @p td
* and associate with @p value.
**/
DVariable * _upsert_value(obj<AAllocator> mm,
const DUniqueString * sym,
TypeDescr td,
obj<AGCObject> value);
///@}
/** @defgroup scm-globalenv-gcobject-facet **/
///@{