xo-inteerpreter2: rework VsmResult to use pointer

Preefer to maintain ref to VSM.result_, since gc will
preserve it.
This commit is contained in:
Roland Conybeare 2026-03-27 12:13:09 -04:00
commit a067d0f7b2
3 changed files with 27 additions and 8 deletions

View file

@ -103,6 +103,8 @@ namespace xo {
{
scope log(XO_DEBUG(debug_flag));
// WARNING: res.value() is unstable - gc may move it
VsmResultExt res = vsm_->read_eval_print(input_span, eof_flag);
REQUIRE(res.is_value());