xo-interpreter2 stack: work on runtime error representation [WIP]

This commit is contained in:
Roland Conybeare 2026-02-12 18:46:43 -05:00
commit ce5232efd9
18 changed files with 524 additions and 27 deletions

View file

@ -6,6 +6,8 @@
#include "Closure.hpp"
#include "LambdaExpr.hpp"
#include "LocalEnv.hpp"
#include "VsmRcx.hpp"
#include <xo/indentlog/scope.hpp>
#include <cstddef>
namespace xo {
@ -33,7 +35,30 @@ namespace xo {
DClosure::apply_nocheck(obj<ARuntimeContext> rcx,
const DArray * args)
{
(void)rcx;
scope log(XO_DEBUG(true));
auto vsm_rcx
= obj<ARuntimeContext,DVsmRcx>::from(rcx);
log && log(xtag("vsm_rcx.data", (void*)vsm_rcx.data()));
// let's try a not-implemented error
// don't want to clutter Procedure facet, since it's
// lower-level than xo-interpreter2
#ifdef NOT_YET
// TODO: verify arguments against type signature.
// unless we have evidence that program is type correct
int32_t n_args = this->n_args();
if (n_args != args->size()) {
//
}
#endif
(void)args;
assert(false);